From 1e7316b4b20dca6e9009779fdc0045986c17cb9a Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Wed, 17 Dec 2003 22:54:43 +0000 Subject: [PATCH] failure case, keep the source count in sync with the number of sources running, locking for shutdown was also affected. svn path=/trunk/icecast/; revision=5700 --- src/source.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/source.c b/src/source.c index c08d9735..56e856c4 100644 --- a/src/source.c +++ b/src/source.c @@ -241,6 +241,10 @@ void *source_main(void *arg) if(source->send_return) { client_send_404(source->client, "Mountpoint in use"); } + global_lock(); + global.sources--; + global_unlock(); + thread_rwlock_unlock(source->shutdown_rwlock); thread_exit(0); return NULL; }