diff options
Diffstat (limited to 'src/Common/Requests/DisconnectRequest.cpp')
-rw-r--r-- | src/Common/Requests/DisconnectRequest.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp index 090b840..81208f2 100644 --- a/src/Common/Requests/DisconnectRequest.cpp +++ b/src/Common/Requests/DisconnectRequest.cpp @@ -43,16 +43,17 @@ bool DisconnectRequest::sendRequest(Net::Connection *connection, uint16_t reques return true; } -bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) { - if(packet.getType() != Net::Packet::OK) - return false; // TODO Logging +void DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) { + if(packet.getType() != Net::Packet::OK) { + signalFinished().emit(); + return; // TODO Logging + } - connection->disconnect(); + connection->disconnect(); - finished(); + finished(); - signalFinished().emit(); - return true; + signalFinished().emit(); } } |