Browse Source

Fix connection close log

The socket is closed at this point so we have to rely on a cached
value for the logging.
tags/v1.11.90
Pierre Ossman 5 years ago
parent
commit
585089797f
2 changed files with 4 additions and 2 deletions
  1. 2
    0
      common/rfb/VNCSConnectionST.h
  2. 2
    2
      common/rfb/VNCServerST.cxx

+ 2
- 0
common/rfb/VNCSConnectionST.h View File

@@ -105,6 +105,8 @@ namespace rfb {
updates.add_copied(dest, delta);
}

const char* getPeerEndpoint() const {return peerEndpoint.buf;}

private:
// SConnection callbacks


+ 2
- 2
common/rfb/VNCServerST.cxx View File

@@ -177,13 +177,13 @@ void VNCServerST::removeSocket(network::Socket* sock) {
if (rfb::Server::maxDisconnectionTime && clients.empty())
disconnectTimer.start(secsToMillis(rfb::Server::maxDisconnectionTime));

CharArray name(strDup((*ci)->getPeerEndpoint()));

// - Delete the per-Socket resources
delete *ci;

clients.remove(*ci);

CharArray name;
name.buf = sock->getPeerEndpoint();
connectionsLog.status("closed: %s", name.buf);

// - Check that the desktop object is still required

Loading…
Cancel
Save