From 4350a11c663b0d75f8119743bffb7736d87abd4d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 14 May 2021 13:56:32 +0100 Subject: Fix sending malformed pong messages in some cases. --- include/clientprotocolmsg.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index 53122cff9..144af9e44 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -668,9 +668,10 @@ struct ClientProtocol::Messages::Pong : public ClientProtocol::Message Pong(const std::string& cookie, const std::string& server = "") : ClientProtocol::Message("PONG", ServerInstance->Config->GetServerName()) { - PushParamRef(ServerInstance->Config->GetServerName()); - if (!server.empty()) - PushParamRef(server); + if (server.empty()) + PushParamRef(ServerInstance->Config->GetServerName()); + else + PushParam(server); PushParamRef(cookie); } }; -- cgit v1.2.3