diff options
| author | Janjaap Bos <janjaap.bos@capitar.com> | 2019-04-03 16:52:40 +0200 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-04-07 19:12:06 -0700 |
| commit | 989c5e90d48066b12ad44ed903cfc163d8e89b29 (patch) | |
| tree | 00e50df55e393495fcf0e3c61ce242f8ff699039 /src | |
| parent | f723fa9655e1e7fadc1a15b94b66de674ab9fe17 (diff) | |
| download | nng-989c5e90d48066b12ad44ed903cfc163d8e89b29.tar.gz nng-989c5e90d48066b12ad44ed903cfc163d8e89b29.tar.bz2 nng-989c5e90d48066b12ad44ed903cfc163d8e89b29.zip | |
Tuning zt transport ping
There is quite some package loss, which I will pursue
later (in nng / zerotier). For now it helps to tune these settings
to keep the peer relations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/transport/zerotier/zerotier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transport/zerotier/zerotier.c b/src/transport/zerotier/zerotier.c index 2c94f0fb..bd8e5d56 100644 --- a/src/transport/zerotier/zerotier.c +++ b/src/transport/zerotier/zerotier.c @@ -78,7 +78,7 @@ static const uint32_t zt_port_mask = 0xffffffu; // mask of valid ports static const uint32_t zt_port_shift = 24; static const int zt_conn_tries = 240; // max connect attempts static const nng_duration zt_conn_time = 500; // between attempts (msec) -static const int zt_ping_tries = 5; // max keepalive attempts +static const int zt_ping_tries = 10; // max keepalive attempts static const nng_duration zt_ping_time = 60000; // keepalive time (msec) // These are compile time tunables for now. @@ -2037,7 +2037,7 @@ zt_pipe_ping_cb(void *arg) nni_mtx_unlock(&zt_lk); return; } - if (p->zp_ping_try >= p->zp_ping_tries) { + if (p->zp_ping_try > p->zp_ping_tries) { // Ping count exceeded; the other side is AFK. // Close the pipe, but no need to send a reason to the peer. zt_pipe_close_err(p, NNG_ECLOSED, 0, NULL); |
