mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
20445. r=warren. We now propagate connection_refused errors from the socket transport.
This commit is contained in:
parent
a6fa44fcaf
commit
0518800fa9
@ -345,7 +345,10 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||||||
("Operation failed via PR_POLL_EXCEPT. [%s:%d %x].\n",
|
("Operation failed via PR_POLL_EXCEPT. [%s:%d %x].\n",
|
||||||
mHostName, mPort, this));
|
mHostName, mPort, this));
|
||||||
// An error has occurred, so cancel the read and/or write operation...
|
// An error has occurred, so cancel the read and/or write operation...
|
||||||
mStatus = NS_BINDING_FAILED;
|
if (mCurrentState == eSocketState_WaitConnect)
|
||||||
|
mStatus = NS_ERROR_CONNECTION_REFUSED;
|
||||||
|
else
|
||||||
|
mStatus = NS_BINDING_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PR_POLL_HUP & aSelectFlags) {
|
if (PR_POLL_HUP & aSelectFlags) {
|
||||||
@ -484,6 +487,9 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||||||
mWritePipeOut = null_nsCOMPtr();
|
mWritePipeOut = null_nsCOMPtr();
|
||||||
SetWriteType(eSocketWrite_None);
|
SetWriteType(eSocketWrite_None);
|
||||||
ClearFlag(eSocketWrite_Done);
|
ClearFlag(eSocketWrite_Done);
|
||||||
|
|
||||||
|
if (mCloseConnectionOnceDone)
|
||||||
|
CloseConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user