summaryrefslogtreecommitdiffstats
path: root/libvncserver/sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/sockets.c')
-rw-r--r--libvncserver/sockets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index e960936..51e86eb 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -394,7 +394,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
do {
rfbProcessClientMessage(cl);
- } while (webSocketsHasDataInBuffer(cl));
+ } while (cl->sock > 0 && webSocketsHasDataInBuffer(cl));
#else
rfbProcessClientMessage(cl);
#endif