bug 773255 nsHttpConnection::Close() on error remove callbacks on mSocketOut r=honzab r=biesi
authorPatrick McManus <mcmanus@ducksong.com>
Thu, 27 Sep 2012 13:29:34 -0400
changeset 108429 198e780680c1943cfc4836b71a2e81e36a5e712d
parent 108428 e670c29ea6feefbaecca1fe2c43bc421110acff3
child 108430 dcae72a1333c8dec3f61f1287f4bcd0127279c04
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewershonzab, biesi
bugs773255
milestone18.0a1
bug 773255 nsHttpConnection::Close() on error remove callbacks on mSocketOut r=honzab r=biesi
netwerk/protocol/http/nsHttpConnection.cpp
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -483,16 +483,18 @@ nsHttpConnection::Close(nsresult reason)
     if (NS_FAILED(reason)) {
         if (mIdleMonitoring)
             EndIdleMonitoring();
 
         if (mSocketTransport) {
             mSocketTransport->SetSecurityCallbacks(nullptr);
             mSocketTransport->SetEventSink(nullptr, nullptr);
             mSocketTransport->Close(reason);
+            if (mSocketOut)
+                mSocketOut->AsyncWait(nullptr, 0, 0, nullptr);
         }
         mKeepAlive = false;
     }
 }
 
 // called on the socket thread
 nsresult
 nsHttpConnection::ProxyStartSSL()