session BUGFIX 0 is an invalid return
diff --git a/src/session_client.c b/src/session_client.c
index 0fb1c4f..60422bf 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -918,7 +918,7 @@
sock = nc_sock_accept_binds(client_opts.ch_binds, client_opts.ch_bind_count, timeout, &host, &port, &idx);
- if (sock < 0) {
+ if (sock < 1) {
return sock;
}
diff --git a/src/session_server.c b/src/session_server.c
index 03f4a89..93a6175 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -1078,7 +1078,7 @@
ret = nc_sock_accept_binds(server_opts.binds, server_opts.endpt_count, timeout, &host, &port, &idx);
- if (ret < 0) {
+ if (ret < 1) {
/* READ UNLOCK */
pthread_rwlock_unlock(&server_opts.endpt_array_lock);
return ret;