Commit 19d5a1976100a4bed84226b1285a07c11972b193

Con Kolivas 2011-12-23T15:50:00

Merge pull request #62 from kanoi/master Cleanup API thread if it exits early

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/main.c b/main.c
index 6c31749..6d8fa66 100644
--- a/main.c
+++ b/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;
 }