Browse Source

Only try to shut down work cleanly if we've successfully connected and started mining.

Con Kolivas 13 years ago
parent
commit
cbef2a6a65
1 changed files with 3 additions and 0 deletions
  1. 3 0
      cgminer.c

+ 3 - 0
cgminer.c

@@ -1983,6 +1983,9 @@ static void __kill_work(void)
 	struct thr_info *thr;
 	struct thr_info *thr;
 	int i;
 	int i;
 
 
+	if (!successful_connect)
+		return;
+
 	applog(LOG_INFO, "Received kill message");
 	applog(LOG_INFO, "Received kill message");
 
 
 	applog(LOG_DEBUG, "Killing off watchpool thread");
 	applog(LOG_DEBUG, "Killing off watchpool thread");