Browse Source

Kill off the longpoll thread in kill_work only if have_longpoll is true.

Con Kolivas 14 years ago
parent
commit
acf88e0da4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      main.c

+ 2 - 1
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");