jputcu / serialport

Cross platform haskell library for using the serial port
Other
43 stars 36 forks source link

Serial `recv` catches too many exceptions #34

Closed mryndzionek closed 4 years ago

mryndzionek commented 4 years ago

Here it seems that it would be better to catch the exceptions more selectively. For example if one is reading in an infinite loop and then the port disappears (USB serial port converter gets disconnected etc) the loop turns into a non-blocking loop consuming all the CPU. In other words there is no way of telling if the B.empty is a timeout, or something more severe.

jputcu commented 4 years ago

Hello, Sorry, but I've more or less abandoned this project going back to C++.

mryndzionek commented 4 years ago

Fair enough :) I'll try to solve this myself.