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:
parent
da50f372d9
commit
92f6b83b16
|
@ -646,7 +646,11 @@ class Kirdy:
|
|||
|
||||
# Reader needn't be closed
|
||||
self._writer.close()
|
||||
await self._writer.wait_closed()
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue