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 10:51:16 -0800
commitf19f763bc702eaf2095256f35b55e181732337c5 (patch)
treefff8cc5471a83082c196becd78f23f7721adc288
parent0bdc0bf75eb5fa3b63b5b5c17faa3adadcc26d93 (diff)
downloadopenvswitch-f19f763bc702eaf2095256f35b55e181732337c5.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 48ae8c6a7..a5b31d099 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -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.
@@ -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