зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136484 - Fix happy eyeballs regression from bug 1003448. r=mcmanus
This commit is contained in:
Родитель
5a08cd380f
Коммит
f46b3c2dec
|
@ -3078,6 +3078,7 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
|||
uint32_t caps)
|
||||
: mEnt(ent)
|
||||
, mTransaction(trans)
|
||||
, mDispatchedMTransaction(false)
|
||||
, mCaps(caps)
|
||||
, mSpeculative(false)
|
||||
, mIsFromPredictor(false)
|
||||
|
@ -3221,7 +3222,7 @@ nsHttpConnectionMgr::nsHalfOpenSocket::SetupPrimaryStreams()
|
|||
nsresult
|
||||
nsHttpConnectionMgr::nsHalfOpenSocket::SetupBackupStreams()
|
||||
{
|
||||
MOZ_ASSERT(mTransaction && !mTransaction->IsNullTransaction());
|
||||
MOZ_ASSERT(mTransaction);
|
||||
|
||||
mBackupSynStarted = TimeStamp::Now();
|
||||
nsresult rv = SetupStreams(getter_AddRefs(mBackupTransport),
|
||||
|
@ -3245,8 +3246,7 @@ nsHttpConnectionMgr::nsHalfOpenSocket::SetupBackupTimer()
|
|||
{
|
||||
uint16_t timeout = gHttpHandler->GetIdleSynTimeout();
|
||||
MOZ_ASSERT(!mSynTimer, "timer already initd");
|
||||
if (timeout && !mTransaction->IsDone() &&
|
||||
!mTransaction->IsNullTransaction()) {
|
||||
if (timeout && !mTransaction->IsDone()) {
|
||||
// Setup the timer that will establish a backup socket
|
||||
// if we do not get a writable event on the main one.
|
||||
// We do this because a lost SYN takes a very long time
|
||||
|
@ -3451,9 +3451,10 @@ nsHalfOpenSocket::OnOutputStreamReady(nsIAsyncOutputStream *out)
|
|||
LOG(("nsHalfOpenSocket::OnOutputStreamReady null transaction will "
|
||||
"be used to finish SSL handshake on conn %p\n", conn.get()));
|
||||
nsRefPtr<nsAHttpTransaction> trans;
|
||||
if (mTransaction->IsNullTransaction()) {
|
||||
if (mTransaction->IsNullTransaction() && !mDispatchedMTransaction) {
|
||||
// null transactions cannot be put in the entry queue, so that
|
||||
// explains why it is not present.
|
||||
mDispatchedMTransaction = true;
|
||||
trans = mTransaction;
|
||||
} else {
|
||||
trans = new NullHttpTransaction(mEnt->mConnInfo,
|
||||
|
|
|
@ -478,6 +478,7 @@ private:
|
|||
private:
|
||||
nsConnectionEntry *mEnt;
|
||||
nsRefPtr<nsAHttpTransaction> mTransaction;
|
||||
bool mDispatchedMTransaction;
|
||||
nsCOMPtr<nsISocketTransport> mSocketTransport;
|
||||
nsCOMPtr<nsIAsyncOutputStream> mStreamOut;
|
||||
nsCOMPtr<nsIAsyncInputStream> mStreamIn;
|
||||
|
|
Загрузка…
Ссылка в новой задаче