fix rare async client bug

This commit is contained in:
Silvris
2024-04-29 20:58:18 -05:00
parent 623b35c8f9
commit 1d1728e82e

View File

@@ -170,7 +170,7 @@ class KDL3SNIClient(SNIClient):
self.item_queue.append(item) # no more slots, get it next go around
async def pop_gift(self, ctx):
if ctx.stored_data[self.giftbox_key]:
if self.giftbox_key in ctx.stored_data and ctx.stored_data[self.giftbox_key]:
from SNIClient import snes_read, snes_buffered_write
key, gift = ctx.stored_data[self.giftbox_key].popitem()
await pop_object(ctx, self.giftbox_key, key)