ljean / modbus-tk

Create Modbus app easily with Python
Other
566 stars 212 forks source link

Reorder RtuServer stop actions #95

Closed desowin closed 6 years ago

desowin commented 6 years ago

Set _block_on_first_byte to False regardless of the state of serial. This fixes the theoretical race condition where thread calling stop preempted server thread that closed serial inside exception handler (before serial is opened again).

I'm sorry for missing this case previously.