[rtmpdump] r193 - trunk/rtmpsuck.c
hyc
subversion at mplayerhq.hu
Wed Jan 6 01:36:41 CET 2010
Author: hyc
Date: Wed Jan 6 01:36:40 2010
New Revision: 193
Log:
Don't try to close server->socket multiple times
Modified:
trunk/rtmpsuck.c
Modified: trunk/rtmpsuck.c
==============================================================================
--- trunk/rtmpsuck.c Tue Jan 5 23:22:07 2010 (r192)
+++ trunk/rtmpsuck.c Wed Jan 6 01:36:40 2010 (r193)
@@ -1000,6 +1000,8 @@ stopStreaming(STREAMING_SERVER * server)
if (server->state != STREAMING_STOPPED)
{
+ int fd = server->socket;
+ server->socket = 0;
if (server->state == STREAMING_IN_PROGRESS)
{
server->state = STREAMING_STOPPING;
@@ -1009,7 +1011,7 @@ stopStreaming(STREAMING_SERVER * server)
msleep(1);
}
- if (closesocket(server->socket))
+ if (fd && closesocket(fd))
Log(LOGERROR, "%s: Failed to close listening socket, error %d",
GetSockError());
More information about the rtmpdump
mailing list