aboutsummaryrefslogtreecommitdiff
path: root/signal
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2004-08-09 12:52:25 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2004-08-09 12:52:25 +0000
commit963d64f43db9d794bbddf0b131cbf8e51858b6b3 (patch)
tree8c9d835b5a00bc1799f5853261d8747f50999643 /signal
parent8783658bcda346e896df8a2df5b0264a12e54e51 (diff)
Fixed problem when loosing connection under windows
svn path=/trunk/externals/ggee/; revision=1923
Diffstat (limited to 'signal')
-rwxr-xr-xsignal/streamin~.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/signal/streamin~.c b/signal/streamin~.c
index 437de67..28c0918 100755
--- a/signal/streamin~.c
+++ b/signal/streamin~.c
@@ -141,7 +141,14 @@ static void streamin_datapoll(t_streamin *x)
n = x->nbytes;
if (x->nbytes == 0) { /* get the new tag */
ret = recv(x->x_socket, (char*) &x->frames[x->framein].tag,sizeof(t_tag),MSG_PEEK);
- if (ret != sizeof(t_tag)) return;
+ if (ret != sizeof(t_tag)) {
+#ifdef NT
+ sys_closesocket(x->x_socket);
+ sys_rmpollfn(x->x_socket);
+ x->x_socket = -1;
+#endif
+ return;
+ }
ret = recv(x->x_socket, (char*) &x->frames[x->framein].tag,sizeof(t_tag),0);
x->nbytes = n = x->frames[x->framein].tag.framesize;