mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 13:52:02 +00:00
Don't try to stop/cancel threads that don't exist.
This commit is contained in:
parent
1c67f6068c
commit
f4f018b498
2
main.c
2
main.c
@ -981,6 +981,8 @@ void kill_work(void)
|
|||||||
/* Stop the mining threads*/
|
/* Stop the mining threads*/
|
||||||
for (i = 0; i < mining_threads; i++) {
|
for (i = 0; i < mining_threads; i++) {
|
||||||
thr = &thr_info[i];
|
thr = &thr_info[i];
|
||||||
|
if (!thr->pth)
|
||||||
|
continue;
|
||||||
tq_freeze(thr->q);
|
tq_freeze(thr->q);
|
||||||
/* No need to check if this succeeds or not */
|
/* No need to check if this succeeds or not */
|
||||||
pthread_cancel(thr->pth);
|
pthread_cancel(thr->pth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user