When we've stored an LLCP update, we need to apply it to the connection state after the correct connection event number (or "instant"). Currently, this is done here:
However, this code is inside the RX handler, so if we happen to miss the event we're supposed to apply the update, we never do so, resulting in the connection being lost completely. This can be seen in the following log:
Event 29 is missed presumably due to interference, we never apply the update, all future events are missed because the connection state is now desynced.
A good way to fix this would probably be to move the code that hops channels and applies the LLCP update into its own function (close_connection_event?) and just call it from the 2 places.
When we've stored an LLCP update, we need to apply it to the connection state after the correct connection event number (or "instant"). Currently, this is done here:
https://github.com/jonas-schievink/rubble/blob/71be7a1bfa596ffa0024be64257bb4165c12036c/rubble/src/link/connection.rs#L276-L281
However, this code is inside the RX handler, so if we happen to miss the event we're supposed to apply the update, we never do so, resulting in the connection being lost completely. This can be seen in the following log:
Event 29 is missed presumably due to interference, we never apply the update, all future events are missed because the connection state is now desynced.