[ https://issues.apache.org/jira/browse/PLC4X-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016104#comment-17016104 ]
Alvaro del Castillo commented on PLC4X-159: ------------------------------------------- During the testing of our modbus plugin I can see traces like: {code:java} 16:43:20.460 [pool-1-thread-1] WARN org.apache.plc4x.java.base.protocol.SingleItemToSingleRequestProtocol - container PlcRequestContainer{request=org.apache.plc4x.java.base.messages.DefaultPlcWriteRequest@5b5ca39c} timed out:HashedWheelTimer$HashedWheelTimeout(deadline: 89318528 ns ago, task: org.apache.plc4x.java.base.protocol.SingleItemToSingleRequestProtocol$$Lambda$32/1244101526@5e1695b4) {code} and probably are the Future threads that have not been finished correctly (but they have written the data in modbus correctly). > modbus: Future which writes data correctly in modbus does not return > -------------------------------------------------------------------- > > Key: PLC4X-159 > URL: https://issues.apache.org/jira/browse/PLC4X-159 > Project: Apache PLC4X > Issue Type: Bug > Components: Driver-Modbus > Reporter: Alvaro del Castillo > Assignee: Christofer Dutz > Priority: Major > Fix For: 0.6.0 > > Attachments: Screenshot from 2019-12-07 09-44-45.png > > > 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: > {code:java} > PlcWriteRequest writeRequest = connection.writeRequestBuilder() > .addItem(registerName, "register:" + offset + "[" + size + "]", > writeRegister) > .build(); > writeRequest.execute().whenComplete((writeResponse, error) -> { > assertNotNull(writeResponse); > }); > {code} > 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. -- This message was sent by Atlassian Jira (v8.3.4#803005)