diff options
author | dscho <dscho> | 2003-02-18 15:49:14 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-02-18 15:49:14 +0000 |
commit | 5ef5c81e7972e70dbc8ed57a0489b6396434ae53 (patch) | |
tree | f67687857d51749a8945536e80bac0da8d3c9b40 | |
parent | 8a5f8f25902812ef75105e3f6fac6f05d0235d9a (diff) | |
download | libtdevnc-5ef5c81e7972e70dbc8ed57a0489b6396434ae53.tar.gz libtdevnc-5ef5c81e7972e70dbc8ed57a0489b6396434ae53.zip |
fixed a bug when closing a client if no longer listening for new clients.
-rw-r--r-- | sockets.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -330,7 +330,8 @@ rfbCloseClient(cl) { FD_CLR(cl->sock,&(cl->screen->allFds)); if(cl->sock==cl->screen->maxFd) - while(!FD_ISSET(cl->screen->maxFd,&(cl->screen->allFds))) + while(cl->screen->maxFd>0 + && !FD_ISSET(cl->screen->maxFd,&(cl->screen->allFds))) cl->screen->maxFd--; shutdown(cl->sock,SHUT_RDWR); close(cl->sock); |