paneldue: exit send loop when serial port is disconnected

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-02-24 07:53:21 -05:00
parent ab6ed40bcb
commit ec85b31a62
1 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,8 @@ class SerialConnection:
async def _do_send(self):
while self.send_buffer:
if not self.connected:
break
try:
sent = os.write(self.fd, self.send_buffer)
except os.error as e: