Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When writing data registers in modbus, the data is written correctly but the Future which does it does not return. The hack is just to not wait for the Future because you don't need the results. Just that the data is written. But if there are some error during the writing you don't know it. And probably the resources are not freed correctly.
Some sample code:
PlcWriteRequest writeRequest = connection.writeRequestBuilder() .addItem(registerName, "register:" + offset + "[" + size + "]", writeRegister) .build(); writeRequest.execute().whenComplete((writeResponse, error) -> { assertNotNull(writeResponse); });
The whenComplete is never called. I have follow the code and the "decode" method is called, so it is when processing the response from the modbus slave where the problem is.