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