зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1275917 - 1st transaction on dontresused h2 session r=hurley
This commit is contained in:
Родитель
9c70251dd9
Коммит
558727e2f9
|
@ -384,6 +384,17 @@ Http2Session::AddStream(nsAHttpTransaction *aHttpTransaction,
|
||||||
mConnection = aHttpTransaction->Connection();
|
mConnection = aHttpTransaction->Connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mClosed || mShouldGoAway) {
|
||||||
|
nsHttpTransaction *trans = aHttpTransaction->QueryHttpTransaction();
|
||||||
|
if (trans && !trans->GetPushedStream()) {
|
||||||
|
LOG3(("Http2Session::AddStream %p atrans=%p trans=%p session unusable - resched.\n",
|
||||||
|
this, aHttpTransaction, trans));
|
||||||
|
aHttpTransaction->SetConnection(nullptr);
|
||||||
|
gHttpHandler->InitiateTransaction(trans, trans->Priority());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
aHttpTransaction->SetConnection(this);
|
aHttpTransaction->SetConnection(this);
|
||||||
|
|
||||||
if (aUseTunnel) {
|
if (aUseTunnel) {
|
||||||
|
|
|
@ -338,6 +338,17 @@ SpdySession31::AddStream(nsAHttpTransaction *aHttpTransaction,
|
||||||
mConnection = aHttpTransaction->Connection();
|
mConnection = aHttpTransaction->Connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mClosed || mShouldGoAway) {
|
||||||
|
nsHttpTransaction *trans = aHttpTransaction->QueryHttpTransaction();
|
||||||
|
if (trans && !trans->GetPushedStream()) {
|
||||||
|
LOG3(("SpdySession31::AddStream %p atrans=%p trans=%p session unusable - resched.\n",
|
||||||
|
this, aHttpTransaction, trans));
|
||||||
|
aHttpTransaction->SetConnection(nullptr);
|
||||||
|
gHttpHandler->InitiateTransaction(trans, trans->Priority());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
aHttpTransaction->SetConnection(this);
|
aHttpTransaction->SetConnection(this);
|
||||||
|
|
||||||
if (aUseTunnel) {
|
if (aUseTunnel) {
|
||||||
|
|
|
@ -1861,6 +1861,8 @@ nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans)
|
||||||
|
|
||||||
Http2PushedStream *pushedStream = trans->GetPushedStream();
|
Http2PushedStream *pushedStream = trans->GetPushedStream();
|
||||||
if (pushedStream) {
|
if (pushedStream) {
|
||||||
|
LOG((" ProcessNewTransaction %p tied to h2 session push %p\n",
|
||||||
|
trans, pushedStream->Session()));
|
||||||
return pushedStream->Session()->
|
return pushedStream->Session()->
|
||||||
AddStream(trans, trans->Priority(), false, nullptr) ?
|
AddStream(trans, trans->Priority(), false, nullptr) ?
|
||||||
NS_OK : NS_ERROR_UNEXPECTED;
|
NS_OK : NS_ERROR_UNEXPECTED;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче