-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: C SSHNPD --monitor-read-timeout
flag
#1458
base: trunk
Are you sure you want to change the base?
Conversation
I added the default constant to |
Most of the changes were in at_c where I was able to handle the socket code. It turns out mbedtls does have handlers for socket closed, but they shouldn't fully be relied on. We do check for them now, but there are also scenarios where the monitor connection is dead and the socket is still considered open, hence we have configured noop to 45 seconds in this PR. This noop is only called if the connection has silently failed since the frequency of stats notifications is more often. |
It is the correct place, but I renamed it to main.h to be more appropriate. |
c58a909
to
693870e
Compare
- What I did
--monitor-read-timeout
option in C SSHNPDHow it works:
Let's say the monitor read timeout is 10 seconds.
Then the monitor connection will do a blocking read on the network buffer for 10 seconds before giving up. Once it gives up, it will send
noop:0\r\n
to do a check if the monitor connection is alive.With this new implementation, the monitor connection will only send a
noop:0\r\n
everymonitor-read-timeout
seconds, at most.- Description for the changelog
feat: C SSHNPD
--monitor-read-timeout
flag