Skip to content

Commit d5f1075

Browse files
committed
Fix curl thread detach
1 parent 24816a8 commit d5f1075

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/src/http/client/curl/http_client_curl.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,18 +462,18 @@ void HttpClient::MaybeSpawnBackgroundThread()
462462
{
463463
if (self->background_thread_)
464464
{
465+
if (self->background_thread_instrumentation_ != nullptr)
466+
{
467+
self->background_thread_instrumentation_->OnEnd();
468+
self->background_thread_instrumentation_.reset();
469+
}
465470
self->background_thread_->detach();
466471
self->background_thread_.reset();
467472
}
468473
break;
469474
}
470475
}
471476
}
472-
473-
if (self->background_thread_instrumentation_ != nullptr)
474-
{
475-
self->background_thread_instrumentation_->OnEnd();
476-
}
477477
},
478478
this));
479479
}

0 commit comments

Comments
 (0)