diff options
author | sr | 2013-02-05 19:00:11 +0100 |
---|---|---|
committer | sr | 2013-02-05 19:00:11 +0100 |
commit | 62fb9fd2b4d6e1d8e0c06f70bb7ba08b1f286be7 (patch) | |
tree | 5a19e024633de3ccdaf2f182b75374d74bac5dbf /src/server/connectionframe | |
parent | [SHARED] Add missing error message if network message parsing fails (diff) | |
download | pvs2-62fb9fd2b4d6e1d8e0c06f70bb7ba08b1f286be7.tar.gz pvs2-62fb9fd2b4d6e1d8e0c06f70bb7ba08b1f286be7.tar.xz pvs2-62fb9fd2b4d6e1d8e0c06f70bb7ba08b1f286be7.zip |
[SERVER/CLIENT] Wait for connection to close properly before deleting socket object
Diffstat (limited to 'src/server/connectionframe')
-rw-r--r-- | src/server/connectionframe/connectionframe.cpp | 5 | ||||
-rw-r--r-- | src/server/connectionframe/connectionframe.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index 6bfce81..05e24a4 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -97,7 +97,7 @@ void ConnectionFrame::setSize(int width, int height) void ConnectionFrame::assignClient(Client* client) { assert(_client == NULL); - connect(client, SIGNAL(destroyed(QObject*)), this, SLOT(onClientDisconnected(QObject*))); + connect(client, SIGNAL(disconnected()), this, SLOT(onClientDisconnected())); connect(client, SIGNAL(thumbUpdated(Client*, const QPixmap&)), this, SLOT(onThumbUpdated(Client*, const QPixmap&))); connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*))); connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*))); @@ -254,9 +254,8 @@ void ConnectionFrame::updateColor() * Slots */ -void ConnectionFrame::onClientDisconnected(QObject* client) +void ConnectionFrame::onClientDisconnected() { - assert(client == _client); if (_timerId != 0) { killTimer(_timerId); diff --git a/src/server/connectionframe/connectionframe.h b/src/server/connectionframe/connectionframe.h index ccb32a8..cc7ab05 100644 --- a/src/server/connectionframe/connectionframe.h +++ b/src/server/connectionframe/connectionframe.h @@ -68,7 +68,7 @@ signals: void clicked(ConnectionFrame* frame); private slots: - void onClientDisconnected(QObject* client); + void onClientDisconnected(); void onThumbUpdated(Client* client, const QPixmap& thumb); void onVncServerStateChange(Client* client); void onVncClientStateChange(Client* client); |