зеркало из https://github.com/mozilla/pjs.git
Rollback some of keep-alive code while investigating 32002 since only
people off-site could reproduce it.
This commit is contained in:
Родитель
5ed0a5f7a2
Коммит
afc0ebdea9
|
@ -22,13 +22,6 @@
|
|||
|
||||
#include "nspr.h"
|
||||
|
||||
#if defined (WIN32)
|
||||
// XXX/ruslan: we don't have CancelIo facility on 95/98 via NSPR.
|
||||
// This needs to get fixed within NSPR eventually
|
||||
#include "private/pprio.h"
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
#include "nsCRT.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nscore.h"
|
||||
|
@ -417,6 +410,9 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||
|
||||
mSelectFlags = PR_POLL_EXCEPT;
|
||||
|
||||
#if 0
|
||||
// investigating 32002
|
||||
|
||||
// XXX/ruslan: in case of keel-alive we need to check whether the connection is still alive;
|
||||
// this is ugly, but so as this state machine. It's too late in doWrite to do anything; let
|
||||
// me know if someone sees a better solution
|
||||
|
@ -432,6 +428,7 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GetReadType() != eSocketRead_None) {
|
||||
// Set the select flags for non-blocking reads...
|
||||
|
@ -562,14 +559,6 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||
mStatus = NS_OK;
|
||||
mSelectFlags &= (~PR_POLL_READ);
|
||||
|
||||
#if defined (WIN32)
|
||||
// XXX/ruslan: we must cancel on Win32 due to winsock implementation details
|
||||
// on some of Microsoft target OSes (98, NT4, Win2K, but not 95); This may
|
||||
// need to be moved into NSPR eventually
|
||||
|
||||
PRInt32 handle = PR_FileDesc2NativeHandle (mSocketFD);
|
||||
CancelIo ((HANDLE)handle);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
mStatus = doRead (aSelectFlags);
|
||||
|
@ -1255,15 +1244,6 @@ nsresult nsSocketTransport::CloseConnection(PRBool bNow)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined (WIN32)
|
||||
// XXX/ruslan: we must cancel on Win32 due to winsock implementation details on some
|
||||
// of Microsoft target OSes (98, NT4, Win2K, but not 95)
|
||||
// This may need to be moved into NSPR eventually; this has to be
|
||||
// done even before PR_Close due to possible layered I/O (SSL for example) conflicts
|
||||
PRInt32 handle = PR_FileDesc2NativeHandle (mSocketFD);
|
||||
CancelIo ((HANDLE)handle);
|
||||
#endif
|
||||
|
||||
status = PR_Close(mSocketFD);
|
||||
if (PR_SUCCESS != status) {
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
@ -1337,6 +1317,8 @@ nsSocketTransport::GetBytesExpected (PRInt32 * bytes)
|
|||
NS_IMETHODIMP
|
||||
nsSocketTransport::SetBytesExpected (PRInt32 bytes)
|
||||
{
|
||||
#if 0
|
||||
// investigating 32002
|
||||
if (mCurrentState == eSocketState_WaitReadWrite)
|
||||
{
|
||||
mBytesExpected = bytes;
|
||||
|
@ -1344,7 +1326,7 @@ nsSocketTransport::SetBytesExpected (PRInt32 bytes)
|
|||
if (mBytesExpected == 0)
|
||||
mService -> Wakeup (this);
|
||||
}
|
||||
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче