node-snap7: S7 Client returns invalid Connected status
Hi,
I’m running the latest version of node-snap7 and having trouble with S7Client.Connected()
method which returns true
in a case when the client was connected to PLC and network broke in the meanwhile (eg. turn off WIFI).
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (5 by maintainers)
Yes, that’s exactly what I have done, it was a minor design change. 😃
I can make another test day after tomorrow and check if the client is able to read after timeout error occurs and the connection is established again. If it fails to read, from my point of view, WSAETIMEDOUT should be considered as “disconnected”. What do you think? Does that make sense to you?
Now we can discuss if a
WSAETIMEDOUT
really is a disconnect 😃 But what you can do is to check for the timeout error code and disconnect from client side.