summaryrefslogtreecommitdiffstats
path: root/src/Common/Requests/DisconnectRequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Requests/DisconnectRequest.cpp')
-rw-r--r--src/Common/Requests/DisconnectRequest.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp
index 0b6e3bc..090b840 100644
--- a/src/Common/Requests/DisconnectRequest.cpp
+++ b/src/Common/Requests/DisconnectRequest.cpp
@@ -37,20 +37,13 @@ bool DisconnectRequest::send(Net::Connection *connection, const sigc::slot<void>
}
bool DisconnectRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
if(!connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId)))
return false;
- setSent();
return true;
}
bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
- if(isFinished())
- return false;
-
if(packet.getType() != Net::Packet::OK)
return false; // TODO Logging
@@ -58,7 +51,7 @@ bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Pac
finished();
- setFinished();
+ signalFinished().emit();
return true;
}