force number of workers in threadpool

This commit is contained in:
Jeff Becker 2018-09-07 16:48:52 -04:00
parent 45df00b632
commit c43a075b74
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 3 additions and 4 deletions

View File

@ -223,10 +223,9 @@ struct llarp_threadpool
struct llarp_threadpool *
llarp_init_threadpool(int workers, const char *name)
{
if(workers > 0)
return new llarp_threadpool(workers, name, false);
else
return nullptr;
if(workers <= 0)
workers = 1;
return new llarp_threadpool(workers, name, false);
}
struct llarp_threadpool *