Add fallback to resync if wait for next confirmation is stuck (#605)
commit898b7c04dd2f05bcf35b7ba7862fee700a2f7c1c
authorJohannes <schugabe@gmx.at>
Sun, 16 May 2021 10:02:20 +0000 (16 12:02 +0200)
committerGitHub <noreply@github.com>
Sun, 16 May 2021 10:02:20 +0000 (16 20:02 +1000)
treea367bbaaa8885db3d38a2e9582de4d1b79748569
parente560c4d2d050088b45c06ed24bc9d9195e618f7a
Add fallback to resync if wait for next confirmation is stuck  (#605)

* Add fallback to resync if wait for next confirmation is stuck

If the stubborn receiver resets right after the last part of a message is received all further communication would be stuck:
The sender would send package index 0 to get the final confirmation and the receiver would wait for package index 1 to start the first message.

This change makes sure that the same timeout that is used during the transmission of data is also applied for the final confirmation.
Switching to the RESYNC state forces the receiver in the correct state and allows to resume communication.

* Fix typo in file name
src/lib/StubbornSender/stubborn_sender.cpp
src/test/stubborn_native/test_stubborn.cpp [moved from src/test/stubborn_native/test_subborn.cpp with 81% similarity]