Skip to content

Commit

Permalink
rconn: Avoid occasional immediate connection failures.
Browse files Browse the repository at this point in the history
The rconn connection timer measures time on the granularity of seconds,
which means that sometimes the actual timeout can be just a millsecond or
so, which led to occasional immediate connection failures from ovs-ofctl.

VMware-BZ: #2295760
Fixes: 476d255 ("rconn: Introduce new invariant to fix assertion failure in corner case.")
Reported-by: Ken Ajiro <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Mar 1, 2019
1 parent 0bdc0bf commit f19f763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rconn.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
* Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -502,7 +502,7 @@ static unsigned int
timeout_CONNECTING(const struct rconn *rc)
OVS_REQUIRES(rc->mutex)
{
return MAX(1, rc->backoff);
return MAX(2, rc->backoff);
}

static void
Expand Down

0 comments on commit f19f763

Please sign in to comment.