aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index b1b18fa7ab..5218d29f41 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -509,6 +509,7 @@ tor_close_socket(int s)
#else
close(s);
#endif
+ tor_assert(n_sockets_open > 0);
--n_sockets_open;
}