summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestHandlers/DisconnectRequestHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/RequestHandlers/DisconnectRequestHandler.cpp')
-rw-r--r--src/Common/RequestHandlers/DisconnectRequestHandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp
index 010f1e7..6a5ca99 100644
--- a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp
+++ b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp
@@ -18,18 +18,17 @@
*/
#include "DisconnectRequestHandler.h"
+#include "../Logger.h"
#include <Net/Connection.h>
#include <Net/Packets/ErrorPacket.h>
-#include <iostream>
-
namespace Mad {
namespace Common {
namespace RequestHandlers {
void DisconnectRequestHandler::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
if(packet.getType() != Net::Packet::DISCONNECT) {
- std::cerr << "Received an unexpected packet." << std::endl;
+ Logger::log(Logger::ERROR, "Received an unexpected packet.");
connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), Common::Exception(Common::Exception::UNEXPECTED_PACKET)));
signalFinished().emit();