mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
fixes bug 329559 "nsSocketInputStream::Available is not implemented properly" r=biesi sr=bzbarsky
This commit is contained in:
parent
03a7feaead
commit
4b0f8e64ec
@ -282,7 +282,7 @@ nsSocketInputStream::Available(PRUint32 *avail)
|
||||
|
||||
fd = mTransport->GetFD_Locked();
|
||||
if (!fd)
|
||||
return NS_BASE_STREAM_WOULD_BLOCK;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// cannot hold lock while calling NSPR. (worried about the fact that PSM
|
||||
@ -301,7 +301,7 @@ nsSocketInputStream::Available(PRUint32 *avail)
|
||||
else {
|
||||
PRErrorCode code = PR_GetError();
|
||||
if (code == PR_WOULD_BLOCK_ERROR)
|
||||
return NS_BASE_STREAM_WOULD_BLOCK;
|
||||
return NS_OK;
|
||||
mCondition = ErrorAccordingToNSPR(code);
|
||||
}
|
||||
rv = mCondition;
|
||||
|
Loading…
x
Reference in New Issue
Block a user