simonvetter / modbus

Go modbus stack (client and server)
MIT License
262 stars 83 forks source link

Server implementation keepalive not working #11

Closed TechplexEngineer closed 2 years ago

TechplexEngineer commented 2 years ago

When connecting to a modbus client, it seems the tcp keep alives are not respected and the connection is closed prematurely.

simonvetter commented 2 years ago

That's correct: the server is not looking at tcp keepalives and uses a configurable timer since the last modbus request to close inactive sessions.

What's your use case for keeping long-lived modbus/tcp connections open without issuing any request? Would setting the ServerConfiguration.Timeout parameter to a higher value work for you?

simonvetter commented 2 years ago

Closing this for inactivity. Feel free to reopen if needed.