Mercurial > pidgin
changeset 6369:1cdc8a11eea5
[gaim-migrate @ 6874]
this should fix up a lockup on disconnect
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 04 Aug 2003 20:10:24 +0000 |
parents | 41e6d15f4687 |
children | a4b83df2165b |
files | src/protocols/irc/irc.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Mon Aug 04 19:39:33 2003 +0000 +++ b/src/protocols/irc/irc.c Mon Aug 04 20:10:24 2003 +0000 @@ -310,7 +310,11 @@ if ((len = read(irc->fd, irc->inbuf + irc->inbufused, IRC_INITIAL_BUFSIZE - 1)) < 0) { gaim_connection_error(gc, "Read error"); return; + } else if (len == 0) { + /* Remote closed the connection, probably */ + return; } + irc->inbufused += len; irc->inbuf[irc->inbufused] = '\0';