diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-02-17 10:25:40 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-02-17 10:31:24 -0800 |
| commit | c28dac1647cdee4cb1ff2d009551689c1bfd905a (patch) | |
| tree | 266eab953de7b75847cee0d737fae16b939f50cc /src/protocol/reqrep0/req.c | |
| parent | 8ac664fdbab302c9e8cd16a1d45ace5bd00046e5 (diff) | |
| download | nng-c28dac1647cdee4cb1ff2d009551689c1bfd905a.tar.gz nng-c28dac1647cdee4cb1ff2d009551689c1bfd905a.tar.bz2 nng-c28dac1647cdee4cb1ff2d009551689c1bfd905a.zip | |
fixes #857 NNG_OPT_REQ_RESENDTIME does not honor NNG_DURATION_INFINITE
Diffstat (limited to 'src/protocol/reqrep0/req.c')
| -rw-r--r-- | src/protocol/reqrep0/req.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c index 69ef27f2..010ee8a6 100644 --- a/src/protocol/reqrep0/req.c +++ b/src/protocol/reqrep0/req.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -515,8 +515,12 @@ req0_run_sendq(req0_sock *s, nni_list *aiolist) // Schedule a resubmit timer. We only do this if we got // a pipe to send to. Otherwise, we should get handled - // the next time that the sendq is run. - nni_timer_schedule(&ctx->timer, nni_clock() + ctx->retry); + // the next time that the sendq is run. We don't do this + // if the retry is "disabled" with NNG_DURATION_INFINITE. + if (ctx->retry > 0) { + nni_timer_schedule( + &ctx->timer, nni_clock() + ctx->retry); + } if (nni_msg_dup(&msg, ctx->reqmsg) != 0) { // Oops. Well, keep trying each context; maybe |
