Browse Source

Cleanup API thread if it exits early

Kano 14 years ago
parent
commit
d80e0ef4ce
1 changed files with 4 additions and 0 deletions
  1. 4 0
      main.c

+ 4 - 0
main.c

@@ -3770,10 +3770,14 @@ static void *workio_thread(void *userdata)
 
 static void *api_thread(void *userdata)
 {
+	struct thr_info *mythr = userdata;
+
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
 	api();
 
+	mythr->pth = 0L;
+
 	return NULL;
 }