From 67a73b90a4c0f91ddf9322cf0ecfc6c99016e384 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 10 Jan 2009 16:08:02 +0000 Subject: ping issues --- src/core/netconnection.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/netconnection.cc') diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index 267ff8f..a3a2a43 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -401,10 +401,10 @@ void NetConnection::send_private_message(std::string const &text) } // send a ping reply -void NetConnection::send_ping_reply() +void NetConnection::send_ping_reply(unsigned long timestamp) { std::ostringstream msg; - msg << "ping " << timestamp() << '\n'; + msg << "ping " << timestamp << '\n'; this->send_raw(msg.str()); } @@ -476,14 +476,14 @@ void NetConnection::parse_incoming_message(const std::string & message) } else if (command == "ping") { unsigned long timestamp; if ((msgstream >> timestamp)) { - + send_ping_reply(timestamp); } } else if (command == "frame") { unsigned long timestamp; if ((msgstream >> timestamp)) { + send_ping_reply(timestamp); connection_timestamp = timestamp; - send_ping_reply(); } } else if (command == "die") { -- cgit v1.2.3