summaryrefslogtreecommitdiff
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index f3ea5d39..f0ec6dae 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -538,6 +538,9 @@ sk_free(resource *r)
if (s->fd >= 0)
{
close(s->fd);
+ if (s->flags & SKF_THREAD)
+ return;
+
if (s == current_sock)
current_sock = sk_next(s);
if (s == stored_sock)