bug: .pop() payload from incoming queue always

This commit is contained in:
JJTech0130 2023-10-11 18:03:41 -04:00
parent bcffab8d28
commit a043673ff0
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6

View file

@ -115,9 +115,9 @@ class APNSConnection:
if payload.id == id:
if filter is not None:
if filter(payload):
return payload
return self._incoming_queue.pop()
else:
return payload
return self._incoming_queue.pop()
while True:
await self._queue_park.wait() # Wait for a new payload to be added to the queue
logger.debug(f"Woken by event, checking for {id}")