Skip to content

Commit

Permalink
reconnect.c: Don't transition back to ACTIVE when forced to RECONNECT.
Browse files Browse the repository at this point in the history
Currently, whenever there is activity on the session, the FSM is
transitioned to ACTIVE. However, this causes reconnect_force_reconnect()
failed to work once there are traffic received from remote after
transition to RECONNECT, it will skip the reconnection phase and directly
go back to ACTIVE for the old session. This patch fixes it so that
when FSM is in RECONNECT state, it doesn't transition back to ACTIVE
directly.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
hzhou8 authored and blp committed Mar 28, 2019
1 parent 5902e72 commit 01d8bf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reconnect.c
Expand Up @@ -495,7 +495,7 @@ reconnect_connect_failed(struct reconnect *fsm, long long int now, int error)
void
reconnect_activity(struct reconnect *fsm, long long int now)
{
if (fsm->state != S_ACTIVE) {
if (fsm->state == S_IDLE) {
reconnect_transition__(fsm, now, S_ACTIVE);
}
fsm->last_activity = now;
Expand Down

0 comments on commit 01d8bf2

Please sign in to comment.