diff options
author | Guenter Geiger <ggeiger@users.sourceforge.net> | 2004-08-09 12:52:25 +0000 |
---|---|---|
committer | Guenter Geiger <ggeiger@users.sourceforge.net> | 2004-08-09 12:52:25 +0000 |
commit | 963d64f43db9d794bbddf0b131cbf8e51858b6b3 (patch) | |
tree | 8c9d835b5a00bc1799f5853261d8747f50999643 /signal | |
parent | 8783658bcda346e896df8a2df5b0264a12e54e51 (diff) |
Fixed problem when loosing connection under windows
svn path=/trunk/externals/ggee/; revision=1923
Diffstat (limited to 'signal')
-rwxr-xr-x | signal/streamin~.c | 9 |
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;
|