Commit afd1d329 authored by Amandeep Singh's avatar Amandeep Singh Committed by Martin T. H. Sandsmark

Fix crash in krfb

Krfb crashes on quit, if any client is connected
due to a rfbClientConnectionGone call missing
parent dca10482
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment