Open meichf opened 2 weeks ago
Could you please attach a wireshark recording of the disconnect part? ... I would assume that when disconnecting sometimes 2 requests are being sent by the driver ... one do disconnect the CIP session and then a second one to disconnect the EIP session ... however in my case I never get a response for the second disconnect ... possibly your device behaves differently.
Also could you please tell us which type of device you are using?
My device is Rockwell Allen-Bradley 1756-L71
Aaaah .. an unconnected send ... that only does one disconnect on EIP level ... but yeah your PLC also doesn't reply ... it just hangs up as soon as it receives the "goodbye" from the client (How rude ;-) )... I'll try to have a look on Friday (Or someone else, if he beats me to it)
Having a closer look it seems that the remote hangs up without even acknowledging having received the request to hang up. I am not quite sure how we can prevent this from appearing in your logs.
And instead of closing the connection, have you thought of using the connection-cache to keep the connection open for the next time you need to read from the PLC?
Ok ... I wraped the sending of a disconnection request with a try-catch block ... I think it should "handle" the problem (It's sort of not really a problem, it's just "rude"). Please test and give us feedback, if we can close this issue.
What happened?
I created a connection using the EtherNet/IP protocol. After reading the data, I needed to release the connection and called the close method of the PlcConnection, which resulted in an error.