summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/RequestManager.cpp')
-rw-r--r--src/Common/RequestManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp
index e2864b1..5d3fdcd 100644
--- a/src/Common/RequestManager.cpp
+++ b/src/Common/RequestManager.cpp
@@ -21,6 +21,8 @@
#include "Request.h"
#include "RequestHandlers/DisconnectRequestHandler.h"
+#include <Net/Packets/ErrorPacket.h>
+
#include <sigc++/bind.h>
#include <sigc++/retype_return.h>
#include <iostream>
@@ -90,6 +92,7 @@ void RequestManager::receiveHandler(Net::Connection *connection, const Net::Pack
std::cerr << "Received an unexpected packet." << std::endl;
+ connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), Exception(Exception::UNEXPECTED_PACKET)));
}
bool RequestManager::sendRequest(Net::Connection *connection, Request *request) {