Respond to server pings with pongs. (Pings are currently not sent.)

This commit is contained in:
JoelKatz
2013-01-07 10:22:26 -08:00
parent ef2f653473
commit c4a3f57d9c

View File

@@ -1157,6 +1157,11 @@ void Peer::recvGetObjectByHash(ripple::TMGetObjectByHash& packet)
void Peer::recvPing(ripple::TMPing& packet)
{
if (packet.type() == ripple::TMPing::PING)
{
packet.set_type(ripple::TMPing::PONG);
sendPacket(boost::make_shared<PackedMessage>(packet, ripple::mtPING));
}
}
void Peer::recvErrorMessage(ripple::TMErrorMsg& packet)