node-modbus-serial icon indicating copy to clipboard operation
node-modbus-serial copied to clipboard

ModbusRTU instance emits error events

Open everhardt opened this issue 2 years ago • 0 comments

The ModbusRTU instance can emit error events since #380. If that error event is not listened for, by default the whole processes crashes. The on('error', ..) handler is not available in the Typescript types.

I'll file a PR in a minute to add it to the Typescript types. I wonder though why we need this. The single client port that emits error events is the RTUBufferedPort. Shouldn't it do handleCallback like the other ports?

everhardt avatar Sep 26 '23 15:09 everhardt