fn hook_curl_multi_remove_handle()

in src/plugin/plugin_curl.rs [217:237]


    fn hook_curl_multi_remove_handle(&self) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
        (
            Box::new(|_, execute_data| {
                validate_num_args(execute_data, 2)?;

                let multi_id = Self::get_resource_id(execute_data)?;
                let ch = execute_data.get_parameter(1);
                let cid = Self::get_handle_id(ch)?;

                CURL_MULTI_INFO_MAP.with(|map| {
                    map.borrow_mut()
                        .entry(multi_id)
                        .or_default()
                        .remove_curl_handle(cid);
                });

                Ok(Box::new(()))
            }),
            Noop::noop(),
        )
    }