diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-20 15:21:06 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-20 15:21:06 -0700 |
| commit | 191c43b57d81754b3572562a1a73d889c4d979e8 (patch) | |
| tree | 47e07f646ec807353262f9d9cb263602a4aa25cd /src | |
| parent | a37093079b492e966344416445aae354b147d30e (diff) | |
| download | nng-191c43b57d81754b3572562a1a73d889c4d979e8.tar.gz nng-191c43b57d81754b3572562a1a73d889c4d979e8.tar.bz2 nng-191c43b57d81754b3572562a1a73d889c4d979e8.zip | |
Lets hold the lock a little while longer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index 23a1793a..c9f18d9d 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -801,9 +801,9 @@ nni_sock_dial(nni_sock *sock, const char *addr, nni_ep **epp, int flags) nni_mtx_unlock(&sock->s_mx); return (rv); } + nni_mtx_lock(&ep->ep_mtx); nni_list_append(&sock->s_eps, ep); // Put a hold on the endpoint, for now. - nni_mtx_lock(&ep->ep_mtx); ep->ep_refcnt++; ep->ep_started = 1; nni_mtx_unlock(&ep->ep_mtx); |
