|
|
@ -155,6 +155,17 @@ void VNCSConnectionST::close(const char* reason)
|
|
|
|
server->lastDisconnectTime = time(0);
|
|
|
|
server->lastDisconnectTime = time(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (sock->outStream().bufferUsage() > 0) {
|
|
|
|
|
|
|
|
sock->cork(false);
|
|
|
|
|
|
|
|
sock->outStream().flush();
|
|
|
|
|
|
|
|
if (sock->outStream().bufferUsage() > 0)
|
|
|
|
|
|
|
|
vlog.error("Failed to flush remaining socket data on close");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (rdr::Exception& e) {
|
|
|
|
|
|
|
|
vlog.error("Failed to flush remaining socket data on close: %s", e.str());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Just shutdown the socket and mark our state as closing. Eventually the
|
|
|
|
// Just shutdown the socket and mark our state as closing. Eventually the
|
|
|
|
// calling code will call VNCServerST's removeSocket() method causing us to
|
|
|
|
// calling code will call VNCServerST's removeSocket() method causing us to
|
|
|
|
// be deleted.
|
|
|
|
// be deleted.
|
|
|
|