diff options
author | Sadie Powell <sadie@witchery.services> | 2020-10-26 18:02:23 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-10-26 18:02:23 +0000 |
commit | 581d1d8fa0ef62e20409543570390613c78e6f5b (patch) | |
tree | f21e89ef87f902a10352abdf4e22f643c07971db /include | |
parent | bf162f683707a2774a60c3801ac4023231998bf5 (diff) |
Fix the behaviour of multi-value PING and PONG messages.
Diffstat (limited to 'include')
-rw-r--r-- | include/clientprotocolmsg.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index 863cdf8b2..07f32b686 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -663,11 +663,14 @@ struct ClientProtocol::Messages::Pong : public ClientProtocol::Message { /** Constructor. * @param cookie Ping cookie. Must remain valid as long as this object is alive. + * @param server Pinged server. Must remain valid as long as this object is alive if non-empty. */ - Pong(const std::string& cookie) + Pong(const std::string& cookie, const std::string& server = "") : ClientProtocol::Message("PONG", ServerInstance->Config->ServerName) { PushParamRef(ServerInstance->Config->ServerName); + if (!server.empty()) + PushParamRef(server); PushParamRef(cookie); } }; |