Connection breaks down if nothing is sent for >= keep alive timeout
chenlijun99 opened this issue · 2 comments
I would expect Tinyproto to schedule some S frames as keep alive frames.
Tinyproto already has this:
tinyproto/src/proto/fd/tiny_fd.c
Line 999 in 164eece
If you consider a bug, let me know
Hi. Sorry for the lack of feedback.
Indeed, there is already a mechanism to send keep alive frames. I can see that sometimes it works, sometimes it doesn't. If I understand the code correctly, once a keep alive frame has been sent, if tiny_fd_connected_check_idle_timeout
is immediately re-called (because tiny_fd_get_tx_data
is immediately re-called), before the response to the keep alive frame is received, then we immediately enter this branch
tinyproto/src/proto/fd/tiny_fd.c
Lines 1001 to 1005 in 164eece
and disconnection is asserted.
Maybe a sort of keepalive response timeout should be considered?