X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.h;h=a1e3c263d54bc88a408d4c22a1bc91663b655c59;hb=330c190958a31a126de7a7b12124070300b1567b;hp=7ac36c0f4ac238e4dba44d44d3e938970a170d12;hpb=e74e8a184a70287e1f438e81a7b8ffc2bf09c46d;p=novacoin.git diff --git a/src/util.h b/src/util.h index 7ac36c0..a1e3c26 100644 --- a/src/util.h +++ b/src/util.h @@ -621,7 +621,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa return (pthread_t)0; } if (!fWantHandle) + { + pthread_detach(hthread); return (pthread_t)-1; + } return hthread; }