1
0
forked from bip/bip

RFC 1459 specifies that the PONG message may have 1 or 2 parameters.

This commit is contained in:
Zach Wily 2010-04-07 22:12:26 +01:00 committed by Arnaud Cornet
parent f995c1f537
commit 4d3ee53e7b

View File

@ -370,7 +370,7 @@ int irc_dispatch_server(bip_t *bip, struct link_server *server,
} else if (irc_line_elem_equals(line, 0, "PONG")) { } else if (irc_line_elem_equals(line, 0, "PONG")) {
/* not all server reply with PONG <servername> <our string> /* not all server reply with PONG <servername> <our string>
* so we blindly assume the PONG is ours. */ * so we blindly assume the PONG is ours. */
if (irc_line_count(line) == 3) { if (irc_line_count(line) == 2 || irc_line_count(line) == 3) {
if (server->laginit_ts != -1) { if (server->laginit_ts != -1) {
irc_compute_lag(server); irc_compute_lag(server);
irc_lag_init(server); irc_lag_init(server);