summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvncserver/main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 4cb18ac..b8cdde1 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -1061,10 +1061,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if(disconnectClients) {
rfbClientPtr cl;
rfbClientIteratorPtr iter = rfbGetClientIterator(screen);
- while( (cl = rfbClientIteratorNext(iter)) )
- if (cl->sock > -1)
- /* we don't care about maxfd here, because the server goes away */
- rfbCloseClient(cl);
+ while( (cl = rfbClientIteratorNext(iter)) ) {
+ if (cl->sock > -1) {
+ /* we don't care about maxfd here, because the server goes away */
+ rfbCloseClient(cl);
+ rfbClientConnectionGone(cl);
+ }
+ }
rfbReleaseClientIterator(iter);
}
OpenPOWER on IntegriCloud