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

msmith at svn.xiph.org msmith at svn.xiph.org
Tue Oct 18 01:39:48 PDT 2005


Author: msmith
Date: 2005-10-18 01:39:46 -0700 (Tue, 18 Oct 2005)
New Revision: 10188

Modified:
   icecast/trunk/ices/src/stream.c
Log:
Don't try to shout_close() something that's already been shout_close()d. 
Hopefully this fix #720.



Modified: icecast/trunk/ices/src/stream.c
===================================================================
--- icecast/trunk/ices/src/stream.c	2005-10-18 04:41:35 UTC (rev 10187)
+++ icecast/trunk/ices/src/stream.c	2005-10-18 08:39:46 UTC (rev 10188)
@@ -295,9 +295,10 @@
                             stream->reconnect_attempts==-1) && 
                             !ices_config->shutdown)
                     {
+                        LOG_WARN0("Trying reconnect after server socket error");
+                        if(i == 0)
+                            shout_close(sdsc->shout);
                         i++;
-                        LOG_WARN0("Trying reconnect after server socket error");
-                        shout_close(sdsc->shout);
                         if((shouterr = shout_open(sdsc->shout)) == SHOUTERR_SUCCESS)
                         {
                             LOG_INFO3("Connected to server: %s:%d%s", 
@@ -329,6 +330,7 @@
                             }
                             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