diff options
author | Sadie Powell <sadie@witchery.services> | 2021-05-14 13:56:32 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-05-14 13:56:32 +0100 |
commit | 4350a11c663b0d75f8119743bffb7736d87abd4d (patch) | |
tree | bb3276c57e6c49eacbdd3e18272b9eea167e9230 /include | |
parent | 1288e9e593bfa014548b1aa48aac4afda98002c8 (diff) |
Fix sending malformed pong messages in some cases.
Diffstat (limited to 'include')
-rw-r--r-- | include/clientprotocolmsg.h | 7 |
1 files changed, 4 insertions, 3 deletions
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); } }; |