try fixing queue size...

This commit is contained in:
Adam 2022-01-23 22:59:47 +01:00
parent 46ad618134
commit dbeb0e73dd

View file

@ -56,6 +56,7 @@ export namespace Queue {
let weight = global.head.weight
let storeKey = global.head.storeKey
global.head = global.head.next
global.size--
let storedPacket = global.store[storeKey]
global.store[storeKey] = null
@ -63,7 +64,6 @@ export namespace Queue {
if (storedPacket == null) {
return null
} else {
global.size--
return {
value: storedPacket,
weight: weight,