mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-08-31 20:39:24 +00:00
fix old keepalive issue
This commit is contained in:
@@ -1169,6 +1169,8 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case WORDL('P', 'I', 'N', 'G'):
|
case WORDL('P', 'I', 'N', 'G'):
|
||||||
|
serv->ping_recv = time (0);
|
||||||
|
serv->lag_sent = 0;
|
||||||
tcp_sendf (sess->server, "PONG %s\r\n", word_eol[3]);
|
tcp_sendf (sess->server, "PONG %s\r\n", word_eol[3]);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1489,6 +1491,8 @@ process_named_servermsg (session *sess, char *buf, char *rawname, char *word_eol
|
|||||||
|
|
||||||
if (!strncmp (buf, "PING ", 5))
|
if (!strncmp (buf, "PING ", 5))
|
||||||
{
|
{
|
||||||
|
sess->server->ping_recv = time (0);
|
||||||
|
sess->server->lag_sent = 0;
|
||||||
tcp_sendf (sess->server, "PONG %s\r\n", buf + 5);
|
tcp_sendf (sess->server, "PONG %s\r\n", buf + 5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user