mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[network] Avoid queue manipulation inside a loop
This commit is contained in:
parent
ee541a5330
commit
525b4e1888
2 changed files with 8 additions and 4 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue