summaryrefslogtreecommitdiff
path: root/sysdep/unix/io-loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/io-loop.c')
-rw-r--r--sysdep/unix/io-loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c
index dbca36e9..b588b736 100644
--- a/sysdep/unix/io-loop.c
+++ b/sysdep/unix/io-loop.c
@@ -252,6 +252,9 @@ sk_start(sock *s)
static void
sockets_remove(struct birdloop *loop, sock *s)
{
+ if (!enlisted(&s->n))
+ return;
+
rem_node(&s->n);
loop->sock_num--;