mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix bogus queue assert firing on failed connection
This commit is contained in:
parent
eaf3355c96
commit
109472e4ab
@ -2,7 +2,7 @@
|
||||
|
||||
// Destroy the linked blocking queue and associated mutex and event
|
||||
PLINKED_BLOCKING_QUEUE_ENTRY LbqDestroyLinkedBlockingQueue(PLINKED_BLOCKING_QUEUE queueHead) {
|
||||
LC_ASSERT(queueHead->shutdown);
|
||||
LC_ASSERT(queueHead->shutdown || queueHead->lifetimeSize == 0);
|
||||
|
||||
PltDeleteMutex(&queueHead->mutex);
|
||||
PltCloseEvent(&queueHead->containsDataEvent);
|
||||
@ -87,6 +87,7 @@ int LbqOfferQueueItem(PLINKED_BLOCKING_QUEUE queueHead, void* data, PLINKED_BLOC
|
||||
}
|
||||
|
||||
queueHead->currentSize++;
|
||||
queueHead->lifetimeSize++;
|
||||
|
||||
PltUnlockMutex(&queueHead->mutex);
|
||||
|
||||
|
@ -20,6 +20,7 @@ typedef struct _LINKED_BLOCKING_QUEUE {
|
||||
int sizeBound;
|
||||
int currentSize;
|
||||
int shutdown;
|
||||
int lifetimeSize;
|
||||
PLINKED_BLOCKING_QUEUE_ENTRY head;
|
||||
PLINKED_BLOCKING_QUEUE_ENTRY tail;
|
||||
} LINKED_BLOCKING_QUEUE, *PLINKED_BLOCKING_QUEUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user