aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 40085a399..018600e25 100644
--- a/src/common/compat.c
+++ b/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;
}