Explorar o código

clean up the socket counting thing. third time's a charm.

svn:r13581
Roger Dingledine %!s(int64=18) %!d(string=hai) anos
pai
achega
d61835a4ba
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/common/compat.c

+ 3 - 1
src/common/compat.c

@@ -525,7 +525,9 @@ tor_close_socket(int s)
 #endif
     r = -1;
   }
-  tor_assert(n_sockets_open > 0);
+  if (n_sockets_open < 0)
+    log_warn(LD_BUG, "Our socket count is below zero: %d. Please submit a "
+             "bug report.", n_sockets_open);
   return r;
 }