From acf88e0da44f91a95bca6cbb74add9ce13ed0631 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 24 Dec 2011 23:36:41 +1100 Subject: [PATCH] Kill off the longpoll thread in kill_work only if have_longpoll is true. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 6674e4d4..4ec49d1f 100644 --- a/main.c +++ b/main.c @@ -2551,7 +2551,8 @@ void kill_work(void) if (opt_debug) applog(LOG_DEBUG, "Killing off longpoll thread"); thr = &thr_info[longpoll_thr_id]; - thr_info_cancel(thr); + if (have_longpoll) + thr_info_cancel(thr); if (opt_debug) applog(LOG_DEBUG, "Killing off work thread");