소스 검색

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

Loading…
취소
저장