MCPcopy Create free account
hub / github.com/apache/skywalking-php / hook_curl_multi_remove_handle

Method hook_curl_multi_remove_handle

src/plugin/plugin_curl.rs:217–237  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

215 }
216
217 fn hook_curl_multi_remove_handle(&self) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
218 (
219 Box::new(|_, execute_data| {
220 validate_num_args(execute_data, 2)?;
221
222 let multi_id = Self::get_resource_id(execute_data)?;
223 let ch = execute_data.get_parameter(1);
224 let cid = Self::get_handle_id(ch)?;
225
226 CURL_MULTI_INFO_MAP.with(|map| {
227 map.borrow_mut()
228 .entry(multi_id)
229 .or_default()
230 .remove_curl_handle(cid);
231 });
232
233 Ok(Box::new(()))
234 }),
235 Noop::noop(),
236 )
237 }
238
239 fn hook_curl_multi_exec(&self) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
240 (

Callers 1

hookMethod · 0.80

Calls 2

validate_num_argsFunction · 0.85
remove_curl_handleMethod · 0.80

Tested by

no test coverage detected