diff options
| author | Stijn Buys <ingar@osirion.org> | 2009-01-10 16:08:02 +0000 | 
|---|---|---|
| committer | Stijn Buys <ingar@osirion.org> | 2009-01-10 16:08:02 +0000 | 
| commit | 67a73b90a4c0f91ddf9322cf0ecfc6c99016e384 (patch) | |
| tree | 3f36be57d9c7c548172bd598b4d128c5efc2d565 /src/core/netconnection.cc | |
| parent | d0d4bd189e2654b61be7740edd15d96b6cab968d (diff) | |
ping issues
Diffstat (limited to 'src/core/netconnection.cc')
| -rw-r--r-- | src/core/netconnection.cc | 8 | 
1 files changed, 4 insertions, 4 deletions
| 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") { | 
