From e89cdd2ae40c66ae881eef3f08f088a57dc8f1b9 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Mon, 9 Apr 2018 22:09:49 +0100 Subject: [PATCH] protocol: Don't handle application messages before CLIENT_HELLO --- src/protocol/net/Session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/protocol/net/Session.cpp b/src/protocol/net/Session.cpp index 9238fb4..3b1dd24 100644 --- a/src/protocol/net/Session.cpp +++ b/src/protocol/net/Session.cpp @@ -101,8 +101,10 @@ namespace net // whether this is a control packet or not if (header.is_control()) on_control_message(header); - else + else if (m_established) on_application_message(header); + else + close(); } void Session::on_control_message(const PacketHeader& header)