Skip to content

Commit 77396c1

Browse files
committed
Add write timeout to SerialTransport
1 parent ea1759f commit 77396c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compost_rpc/compost_rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ def __init__(self, serial_port: str, baudrate: int) -> None:
977977
import serial
978978
except ImportError:
979979
raise ImportError("Package pyserial not found. Install pyserial to use the serial transport with Compost.")
980-
self.port = serial.Serial(serial_port, baudrate)
980+
self.port = serial.Serial(serial_port, baudrate, write_timeout=1)
981981

982982
def send(self, msg: bytes):
983983
sent = 0

0 commit comments

Comments
 (0)