# HG changeset patch # User Paul Aurich # Date 1237094021 0 # Node ID c3c2e8b64539db6be507ac011c20a6f671ffe78b # Parent 71835e00c0fced4fdaf9916aa0f820f29c5ac39e Close a small race with disconnecting while establishing a connection and a potential invalid use of a fd. diff -r 71835e00c0fc -r c3c2e8b64539 libpurple/protocols/jabber/bosh.c --- a/libpurple/protocols/jabber/bosh.c Sun Mar 15 05:10:46 2009 +0000 +++ b/libpurple/protocols/jabber/bosh.c Sun Mar 15 05:13:41 2009 +0000 @@ -137,6 +137,8 @@ if (conn->fd >= 0) close(conn->fd); + purple_proxy_connect_cancel_with_handle(conn); + g_free(conn); } @@ -525,6 +527,7 @@ * with AIM! */ conn->ready = FALSE; + conn->fd = -1; if (conn->bosh->pipelining) /* Hmmmm, fall back to multiple connections */