[Freeswitch-svn] [commit] r7625 - freeswitch/trunk/src/mod/event_handlers/mod_event_multicast

Freeswitch SVN anthm at freeswitch.org
Fri Feb 15 14:55:20 EST 2008


Author: anthm
Date: Fri Feb 15 14:55:19 2008
New Revision: 7625

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c

Log:
update

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	Fri Feb 15 14:55:19 2008
@@ -248,13 +248,22 @@
 {
 	int x = 0;
 
-	switch_socket_shutdown(globals.udp_socket, SWITCH_SHUTDOWN_READWRITE);
-	globals.running = -1;
-	while (x < 100000 && globals.running) {
-		x++;
-		switch_yield(1000);
+	if (globals.udp_socket) {
+		switch_socket_shutdown(globals.udp_socket, SWITCH_SHUTDOWN_READWRITE);
+		switch_socket_close(globals.udp_socket);
+		globals.udp_socket = NULL;
 	}
+
+	if (globals.running == 1) {
+		globals.running = -1;
+		while (x < 100000 && globals.running) {
+			x++;
+			switch_yield(1000);
+		}
+	}
+
 	switch_core_hash_destroy(&globals.event_hash);
+
 	return SWITCH_STATUS_SUCCESS;
 }
 



More information about the Freeswitch-svn mailing list