fix patch ping event case
This commit is contained in:
+2
-3
@@ -228,9 +228,7 @@ void Client::dispatch_send_ping(evutil_socket_t, short, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Client::send_ping() {
|
void Client::send_ping() {
|
||||||
if (this->version() == GameVersion::PATCH) {
|
if (this->version() != GameVersion::PATCH) {
|
||||||
throw logic_error("send_ping called for patch client");
|
|
||||||
}
|
|
||||||
this->log.info("Sending ping command");
|
this->log.info("Sending ping command");
|
||||||
// The game doesn't use this timestamp; we only use it for debugging purposes
|
// The game doesn't use this timestamp; we only use it for debugging purposes
|
||||||
be_uint64_t timestamp = now();
|
be_uint64_t timestamp = now();
|
||||||
@@ -240,6 +238,7 @@ void Client::send_ping() {
|
|||||||
this->log.info("Failed to send ping: %s", e.what());
|
this->log.info("Failed to send ping: %s", e.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Client::dispatch_idle_timeout(evutil_socket_t, short, void* ctx) {
|
void Client::dispatch_idle_timeout(evutil_socket_t, short, void* ctx) {
|
||||||
reinterpret_cast<Client*>(ctx)->idle_timeout();
|
reinterpret_cast<Client*>(ctx)->idle_timeout();
|
||||||
|
|||||||
Reference in New Issue
Block a user