]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Wait also for the active TCP threads on shutdown 361/head
authorJaroslav Kysela <perex@perex.cz>
Mon, 24 Mar 2014 13:39:54 +0000 (14:39 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 24 Mar 2014 13:39:54 +0000 (14:39 +0100)
src/tcp.c

index a50e7ea4b1e1c06fb6b465247ed67d13e454014d..ee003a1937f5054fd19c2be4b44d07cb6e6d2d0d 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -727,7 +727,8 @@ tcp_server_done(void)
   tvh_pipe_close(&tcp_server_pipe);
   tvhpoll_destroy(tcp_server_poll);
   
-  assert(LIST_FIRST(&tcp_server_active) == NULL);
+  while (LIST_FIRST(&tcp_server_active) != NULL)
+    usleep(20000);
   pthread_mutex_lock(&global_lock);
   while ((tsl = LIST_FIRST(&tcp_server_join)) != NULL) {
     LIST_REMOVE(tsl, jlink);