diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-10-14 12:53:48 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-10-14 12:53:48 +0200 |
commit | e6fb25e4b88e6cb78a9758b43d2a6b2b749ff739 (patch) | |
tree | ade8652f6d812eee0c74909aecedf7aeb8e2193d | |
parent | e71a426f0c41f21df60f0bc3047eafac203b14ce (diff) | |
parent | 8e09912f9d66e5bef8146040b366286c661e3b53 (diff) | |
download | tigervnc-e6fb25e4b88e6cb78a9758b43d2a6b2b749ff739.tar.gz tigervnc-e6fb25e4b88e6cb78a9758b43d2a6b2b749ff739.zip |
Merge branch 'fix-mistake' of https://github.com/gschwind/tigervnc
-rw-r--r-- | common/rfb/VNCServerST.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index a24bb223..b3cc7a1f 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -165,8 +165,6 @@ void VNCServerST::removeSocket(network::Socket* sock) { std::list<VNCSConnectionST*>::iterator ci; for (ci = clients.begin(); ci != clients.end(); ci++) { if ((*ci)->getSock() == sock) { - clients.remove(*ci); - // - Remove any references to it if (pointerClient == *ci) pointerClient = NULL; @@ -182,6 +180,8 @@ void VNCServerST::removeSocket(network::Socket* sock) { // - Delete the per-Socket resources delete *ci; + clients.remove(*ci); + CharArray name; name.buf = sock->getPeerEndpoint(); connectionsLog.status("closed: %s", name.buf); |