diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-03-19 21:33:21 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-03-19 21:33:21 -0700 |
| commit | b259ae8cbfc458d22cad351fa672ab2feb66b275 (patch) | |
| tree | ea8d574fa68da94fc2802f2621eaf0cba6b9ef23 /src/core/endpt.c | |
| parent | ce40ef41046158658939ca6bc476aac4ecae950a (diff) | |
| download | nng-b259ae8cbfc458d22cad351fa672ab2feb66b275.tar.gz nng-b259ae8cbfc458d22cad351fa672ab2feb66b275.tar.bz2 nng-b259ae8cbfc458d22cad351fa672ab2feb66b275.zip | |
Wake on refcnt == 0, not 1.
Diffstat (limited to 'src/core/endpt.c')
| -rw-r--r-- | src/core/endpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c index 92a974a8..5e5493b5 100644 --- a/src/core/endpt.c +++ b/src/core/endpt.c @@ -41,7 +41,7 @@ nni_ep_rele(nni_ep *ep) { nni_mtx_lock(nni_idlock); ep->ep_refcnt--; - if (ep->ep_refcnt == 1) { + if (ep->ep_refcnt == 0) { nni_cv_wake(&ep->ep_refcv); } nni_mtx_unlock(nni_idlock); |
