From e1aaea4357d61557c5d6be99fa3e5a9b3a55f784 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 21 Oct 2010 23:14:14 +0100 Subject: Fixed Ping Timeout on connection takeover (bug #692). --- irc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 3044c593..d599fdf8 100644 --- a/irc.c +++ b/irc.c @@ -196,7 +196,8 @@ void irc_abort( irc_t *irc, int immed, char *format, ... ) va_end( params ); } - irc_write( irc, "ERROR :Closing link: %s", reason ? : "" ); + if( reason ) + irc_write( irc, "ERROR :Closing link: %s", reason ); ipc_to_master_str( "OPERMSG :Client exiting: %s@%s [%s]\r\n", irc->user->nick ? irc->user->nick : "(NONE)", @@ -709,6 +710,9 @@ void irc_sync( irc_t *irc ) if( ic->flags & IRC_CHANNEL_JOINED ) irc_send_join( ic, irc->user ); } + + /* We may be waiting for a PONG from the previous client connection. */ + irc->pinging = FALSE; } void irc_desync( irc_t *irc ) -- cgit v1.2.3