From 581d1d8fa0ef62e20409543570390613c78e6f5b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 26 Oct 2020 18:02:23 +0000 Subject: Fix the behaviour of multi-value PING and PONG messages. --- include/clientprotocolmsg.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') 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); } }; -- cgit v1.2.3