From 191c43b57d81754b3572562a1a73d889c4d979e8 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 20 Jul 2017 15:21:06 -0700 Subject: Lets hold the lock a little while longer. --- src/core/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/socket.c') 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); -- cgit v1.2.3-70-g09d2