Connection reset by peer after certain amount of time

32 views
Skip to first unread message

Konstantinos Chalas

unread,
Dec 12, 2016, 8:34:42 AM12/12/16
to libmodbus
Hello everyone,

After we open a new connection and a certain time of inactivity passes by (around 10 seconds), in the next write or read operation we will get the error "Connection reset by peer". I have a couple of questions regarding this issue, and i would be very grateful if you could answer them,

1) Is the modbus_set_response_timeout() the proper method to alter this behavior?
2) The library's default response_timeout is 500 milliseconds. The 10 seconds timeout i face in my case (with the default timeout), don't make much sense then, enforcing my belief that the response_timeout is irrelevant with my error. What do you think?

Thank you,
Konstantinos 

Stéphane Raimbault

unread,
Dec 13, 2016, 4:30:08 AM12/13/16
to libm...@googlegroups.com
It means the server has closed its connection, the client/master can't change that behaviour.
What do you use on the server?

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+unsubscribe@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages