Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-01-19 09:43:10 +08:00
commit cad030d6cc
11 changed files with 109 additions and 59 deletions

View file

@ -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());
}

View file

@ -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 &);