aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nng.c b/src/nng.c
index a8b145f9..c6dfb7f4 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -56,7 +56,9 @@ nng_close(nng_socket sid)
int rv;
nni_sock *sock;
- if ((rv = nni_sock_hold(&sock, sid)) != 0) {
+ // Close is special, because we still want to be able to get
+ // a hold on the socket even if shutdown was called.
+ if ((rv = nni_sock_hold_close(&sock, sid)) != 0) {
return (rv);
}
// No release -- close releases it.
@@ -607,3 +609,10 @@ nng_device(nng_socket sock1, nng_socket sock2)
// Device TBD.
return (NNG_ENOTSUP);
}
+
+
+void
+nng_usleep(uint64_t usec)
+{
+ nni_usleep(usec);
+}