20445. r=warren. We now propagate connection_refused errors from the socket transport.

This commit is contained in:
valeski%netscape.com 2000-01-25 02:29:42 +00:00
parent a6fa44fcaf
commit 0518800fa9

View File

@ -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();
} }
// //