aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-31 11:33:22 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-31 11:33:22 -0800
commit19f8bc9dda454d4994639bc5528c3cdf25e1a472 (patch)
tree247261582b9addaa0a570dd40c5bbcc1535a93cb /src/core
parent948ff35ee7650d44add0b623593c52b5865c473a (diff)
downloadnng-19f8bc9dda454d4994639bc5528c3cdf25e1a472.tar.gz
nng-19f8bc9dda454d4994639bc5528c3cdf25e1a472.tar.bz2
nng-19f8bc9dda454d4994639bc5528c3cdf25e1a472.zip
Restructure to be less confusing to uncrustify.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/endpt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index 901831ef..2a0093fb 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -116,7 +116,8 @@ nni_endpt_connect(nni_endpt *ep, nni_pipe **pp)
if ((rv = nni_pipe_create(&pipe, ep)) != 0) {
return (rv);
}
- if ((rv = ep->ep_ops.ep_connect(ep->ep_data, &pipe->p_trandata)) != 0) {
+ rv = ep->ep_ops.ep_connect(ep->ep_data, &pipe->p_trandata);
+ if (rv != 0) {
nni_pipe_destroy(pipe);
return (rv);
}
@@ -306,18 +307,17 @@ nni_listener(void *arg)
if (rv == 0) {
ep->ep_bound = 1;
- } else {
- // Invalid address? Out of memory? Who knows.
- // Try again in a bit (10ms).
- // XXX: PROPER BACKOFF NEEDED
- cooldown = 10000;
- cooldown += nni_clock();
- while (!ep->ep_close) {
- rv = nni_cond_waituntil(&ep->ep_cv,
- cooldown);
- if (rv == NNG_ETIMEDOUT) {
- break;
- }
+ break;
+ }
+ // Invalid address? Out of memory? Who knows.
+ // Try again in a bit (10ms).
+ // XXX: PROPER BACKOFF NEEDED
+ cooldown = 10000;
+ cooldown += nni_clock();
+ while (!ep->ep_close) {
+ rv = nni_cond_waituntil(&ep->ep_cv, cooldown);
+ if (rv == NNG_ETIMEDOUT) {
+ break;
}
}
}