steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
269 stars 111 forks source link

Unexpected Connection Closed by peer #132

Closed chaos84731 closed 11 months ago

chaos84731 commented 2 years ago

Expected Behavior

Being able to write to coils and registers (single and multiple) without the connection being closed.

Actual Behavior

Random closure of the connection after writing to coils or registers.

Steps to Reproduce the Problem

  1. Send command via Simply Modbus TCP Client image

  2. Have the connection randomly close.

Specifications

Hi Randomly I will get a Error 66 (connection closed by peer) when I am writing registers. Please help.

Thanks

steveohara commented 1 year ago

Is it possible you can reproduce with a unit test?

chaos84731 commented 11 months ago

Turns out the Error was in my code and updating the Slave while writing values.