Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ev_unref() when num_handles_ reaches zero.

  • Loading branch information...
commit 4803bf31532d5567f8285bb94a600b23058cc166 1 parent 99b586d
@bnoordhuis authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 curl.cc
View
4 curl.cc
@@ -186,12 +186,14 @@ Handle<Value> MultiHandle::Add(EasyHandle& ch) {
}
Handle<Value> MultiHandle::Remove(EasyHandle& ch) {
+ assert(num_handles_ > 0);
+
const CURLMcode status = curl_multi_remove_handle(mh_, ch);
if (status != CURLM_OK) {
return CurlError(status);
}
- if (--num_handles_ == 1) {
+ if (--num_handles_ == 0) {
// stop the event loop
ev_unref();
}
Please sign in to comment.
Something went wrong with that request. Please try again.