summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2019-03-01 10:51:16 -0800
committerBen Pfaff <blp@ovn.org>2019-03-01 11:00:18 -0800
commit9aa1fe3057551e2a0cddcc640ceb82cc6428f003 (patch)
treec815533fb76f3480d25ee54aa00a9fee62597e90
parent39a309f0b5fa6ff5d0a75d79cfeb8b3deccdd8b1 (diff)
downloadopenvswitch-9aa1fe3057551e2a0cddcc640ceb82cc6428f003.tar.gz
rconn: Avoid occasional immediate connection failures.
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: 476d2551abd2 ("rconn: Introduce new invariant to fix assertion failure in corner case.") Reported-by: Ken Ajiro <ken-ajiro@xr.jp.nec.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--lib/rconn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rconn.c b/lib/rconn.c
index 4a462bc8e..78b514915 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 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.
@@ -489,7 +489,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