From 1ab6280eacda5ad7523db7f37ffece2d9ef430bb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 14 Jun 2014 11:08:16 +1000 Subject: [PATCH] Don't try to empty a closed socket --- src/libckpool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libckpool.c b/src/libckpool.c index aada784a..aa7047ed 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -482,6 +482,9 @@ void empty_socket(int fd) { int ret; + if (fd < 1) + return; + do { char buf[PAGESIZE]; tv_t timeout = {0, 0};