From 8a20acfa34e1eedf34254354b8a219bd8fbca2ed Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 7 Mar 2018 17:06:16 -0800 Subject: fixes #269 nngcat unreliable with ZeroTier transport This does a few things. First it closes a case where a dropped message could prevent subsequent connection attempts from getting through. Second, it changes the rate at which we retry, and the timeout, to be a lot more aggressive when attempting to establish a connection. We retry every 500 ms, for up to 2 minutes, before giving up. This gives a lot more resilience in the face of message loss that is typical of ZeroTier in some environments when first establishing communication. Third, makes the values for the connection attempts *tunable*, so that applications can adjust for different deployment scenarios. Fourth, it includes the ability to get the UDP socket name. This was needed during some debug, and may be useful for a real UDP transport later, so we're keeping it. Finally, we added documentation for the above items. --- tests/zt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/zt.c') diff --git a/tests/zt.c b/tests/zt.c index fa662857..4009588a 100644 --- a/tests/zt.c +++ b/tests/zt.c @@ -103,7 +103,7 @@ check_props(nng_msg *msg) z = sizeof(c); c = 0; - So(nng_pipe_getopt(p, NNG_OPT_ZT_PING_COUNT, &c, &z) == 0); + So(nng_pipe_getopt(p, NNG_OPT_ZT_PING_TRIES, &c, &z) == 0); So(c > 0 && c < 10); // actually 5... t = 0; -- cgit v1.2.3-70-g09d2