ソースを参照

fix to early remove of iterator in VNCServerST::removeSocket

tags/v1.9.90
Benoit Gschwind 4年前
コミット
8e09912f9d
1個のファイルの変更2行の追加2行の削除
  1. 2
    2
      common/rfb/VNCServerST.cxx

+ 2
- 2
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);

読み込み中…
キャンセル
保存