announce M17 PONG packets

unstable
Tom Early 4 years ago
parent 6e12008798
commit ba08b8b127

@ -128,7 +128,7 @@ void CM17Protocol::Task(void)
} }
else if ( IsValidKeepAlivePacket(Buffer, Callsign) ) else if ( IsValidKeepAlivePacket(Buffer, Callsign) )
{ {
//std::cout << "M17 keepalive packet from " << Callsign << " at " << Ip << std::endl; std::cout << "M17 keepalive packet from " << Callsign << " at " << Ip << std::endl;
// find all clients with that callsign & ip and keep them alive // find all clients with that callsign & ip and keep them alive
CClients *clients = g_Reflector.GetClients(); CClients *clients = g_Reflector.GetClients();
@ -295,9 +295,7 @@ void CM17Protocol::HandleKeepalives(void)
else if ( !client->IsAlive() ) else if ( !client->IsAlive() )
{ {
// no, disconnect // no, disconnect
CBuffer disconnect; Send("DISC", client->GetIp());
disconnect.Set("DISC");
Send(disconnect, client->GetIp());
// remove it // remove it
std::cout << "M17 client " << client->GetCallsign() << " keepalive timeout" << std::endl; std::cout << "M17 client " << client->GetCallsign() << " keepalive timeout" << std::endl;

Loading…
Cancel
Save

Powered by TurnKey Linux.