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

git-svn-id: svn://10.0.0.236/trunk@58507 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
valeski%netscape.com
2000-01-25 02:29:42 +00:00
parent 4f4e669165
commit d2bdd7b1cf

View File

@@ -345,7 +345,10 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
("Operation failed via PR_POLL_EXCEPT. [%s:%d %x].\n",
mHostName, mPort, this));
// 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) {
@@ -484,6 +487,9 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
mWritePipeOut = null_nsCOMPtr();
SetWriteType(eSocketWrite_None);
ClearFlag(eSocketWrite_Done);
if (mCloseConnectionOnceDone)
CloseConnection();
}
//