mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 862744: Fix code to avoid reusing a DataChannel while it's in the process of closing r=jesup
This commit is contained in:
parent
fb304375b7
commit
b318d15e07
@ -829,7 +829,7 @@ DataChannelConnection::FindChannelByStream(uint16_t streamOut)
|
||||
uint16_t
|
||||
DataChannelConnection::FindFreeStream()
|
||||
{
|
||||
uint32_t i, limit;
|
||||
uint32_t i, j, limit;
|
||||
|
||||
limit = mStreams.Length();
|
||||
if (limit > MAX_NUM_STREAMS)
|
||||
@ -838,15 +838,16 @@ DataChannelConnection::FindFreeStream()
|
||||
for (i = (mAllocateEven ? 0 : 1); i < limit; i += 2) {
|
||||
if (!mStreams[i]) {
|
||||
// Verify it's not still in the process of closing
|
||||
for (uint32_t j = 0; j < mStreamsResetting.Length(); ++j) {
|
||||
for (j = 0; j < mStreamsResetting.Length(); ++j) {
|
||||
if (mStreamsResetting[j] == i) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
if (j = mStreamsResetting.Length())
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == limit) {
|
||||
if (i >= limit) {
|
||||
return INVALID_STREAM;
|
||||
}
|
||||
return i;
|
||||
|
Loading…
Reference in New Issue
Block a user