tinyproto icon indicating copy to clipboard operation
tinyproto copied to clipboard

fix(tiny_fd): assert disconnection on (re-)connection request of a co…

Open chenlijun99 opened this issue 3 years ago • 3 comments

This may happen for example if the peer was reset and right after boot it sends the SABM or SNRM frame. If the startup time of the peer is short (in the worst case it is enough that the startup time is less than the keep-alive timeout), it is possible that the primary has not detected the disconnection of peer yet.

Fixes #36

chenlijun99 avatar Jun 19 '22 20:06 chenlijun99

I'm sorry for so very long delay. The fix confused me that it doesn't take into account all possible states, when communication is considered active. It seems that DISCONNECTING state should be also use this new branch. I need to test it

lexus2k avatar Jul 18 '22 16:07 lexus2k

Thanks for the reply. Honestly, I think I should have included some unit tests, but the existing testing fixtures are rather unfamiliar to me. If you are so kind to test and validate this patch, that would be awesome! Alternatively, I'll take some time to add the tests, but I can't promise anything in terms of time.

chenlijun99 avatar Jul 18 '22 16:07 chenlijun99

BTW

It seems that DISCONNECTING state should be also use this new branch.

Seems reasonable to me.

chenlijun99 avatar Jul 18 '22 16:07 chenlijun99