Now calling pthread_detach for each thread

fix-issue-128
Andras Retzler 2019-02-27 17:07:58 +01:00
rodzic 17b8c7b3c0
commit 6ef2a74206
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -201,6 +201,12 @@ int main(int argc, char* argv[])
{
if(clients[i]->status == CS_THREAD_FINISHED)
{
if(pthread_detach(clients[i]->thread)!=0)
{
fprintf(stderr,"nmux pthread_detach failed for client %d\n", i);
continue;
}
if(NMUX_DEBUG) fprintf(stderr, "mainfor: client removed: %d\n", i);
//client destructor
pool->remove_thread(clients[i]->tsmthread);