yaacov/node-modbus-serial

ModbusRTU instance emits error events

everhardt opened this issue · 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?