[xiph-commits] r10385 - icecast/trunk/ices/src

msmith at svn.xiph.org msmith at svn.xiph.org
Tue Nov 15 06:52:24 PST 2005


Author: msmith
Date: 2005-11-15 06:52:22 -0800 (Tue, 15 Nov 2005)
New Revision: 10385

Modified:
   icecast/trunk/ices/src/stream.c
Log:
Refix previous fix. Don't set sdsc->shout to NULL.
This should actually be correct, assuming shout_close() is idempotent.


Modified: icecast/trunk/ices/src/stream.c
===================================================================
--- icecast/trunk/ices/src/stream.c	2005-11-15 10:49:36 UTC (rev 10384)
+++ icecast/trunk/ices/src/stream.c	2005-11-15 14:52:22 UTC (rev 10385)
@@ -291,13 +291,13 @@
                     input_flush_queue(stream->queue, 1);
                     thread_mutex_unlock(&ices_config->flush_lock);
                     
+                    shout_close(sdsc->shout);
+
                     while((i < stream->reconnect_attempts ||
                             stream->reconnect_attempts==-1) && 
                             !ices_config->shutdown)
                     {
                         LOG_WARN0("Trying reconnect after server socket error");
-                        if(i == 0)
-                            shout_close(sdsc->shout);
                         i++;
                         if((shouterr = shout_open(sdsc->shout)) == SHOUTERR_SUCCESS)
                         {
@@ -330,7 +330,6 @@
                             }
                             else /* Don't try again too soon */
                                 thread_sleep (stream->reconnect_delay*1000000); 
-                            sdsc->shout = NULL;
                         }
                     }
                     stream->skip = 0;



More information about the commits mailing list