summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/protocol/http/Http2Session.cpp10
-rw-r--r--netwerk/protocol/http/Http2Session.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp
index 805ea09038..0bd9440034 100644
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -1146,7 +1146,9 @@ Http2Session::RemoveStreamFromQueues(Http2Stream *aStream)
}
void
-Http2Session::CloseStream(Http2Stream *aStream, nsresult aResult)
+Http2Session::CloseStream(Http2Stream *aStream,
+ nsresult aResult,
+ bool aRemoveFromQueue)
{
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
LOG3(("Http2Session::CloseStream %p %p 0x%x %X\n",
@@ -1161,7 +1163,9 @@ Http2Session::CloseStream(Http2Stream *aStream, nsresult aResult)
mInputFrameDataStream = nullptr;
}
- RemoveStreamFromQueues(aStream);
+ if (aRemoveFromQueue) {
+ RemoveStreamFromQueues(aStream);
+ }
if (aStream->IsTunnel()) {
UnRegisterTunnel(aStream);
@@ -1914,7 +1918,7 @@ Http2Session::RecvGoAway(Http2Session *self)
if (self->mPeerGoAwayReason == HTTP_1_1_REQUIRED) {
stream->Transaction()->DisableSpdy();
}
- self->CloseStream(stream, NS_ERROR_NET_RESET);
+ self->CloseStream(stream, NS_ERROR_NET_RESET, false);
self->mStreamTransactionHash.Remove(stream->Transaction());
}
diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h
index d9a3c2b72b..9d6b8c8611 100644
--- a/netwerk/protocol/http/Http2Session.h
+++ b/netwerk/protocol/http/Http2Session.h
@@ -270,7 +270,7 @@ private:
void GenerateGoAway(uint32_t);
void CleanupStream(Http2Stream *, nsresult, errorType);
void CleanupStream(uint32_t, nsresult, errorType);
- void CloseStream(Http2Stream *, nsresult);
+ void CloseStream(Http2Stream *, nsresult, bool aRemoveFromQueue = true);
void SendHello();
void RemoveStreamFromQueues(Http2Stream *);
nsresult ParsePadding(uint8_t &, uint16_t &);