1
0
forked from M-Labs/kirdy

gui: Fix a bug which dfu cmd can cause connrst err

- Kirdy may close and reset itself before host computer ends its session
This commit is contained in:
linuswck 2024-06-17 12:46:42 +08:00
parent da50f372d9
commit 92f6b83b16

View File

@ -646,7 +646,11 @@ class Kirdy:
# Reader needn't be closed
self._writer.close()
try:
await self._writer.wait_closed()
except ConnectionResetError:
# In Hard Reset/DFU cmd, Kirdy may close its socket first
pass
self._reader = None
self._writer = None