Skip to content

Commit 0ae7592

Browse files
committed
session server BUGFIX proper invalid FD check
1 parent 81e817b commit 0ae7592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/session_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ nc_accept(int timeout, const struct ly_ctx *ctx, struct nc_session **session)
23032303
}
23042304

23052305
ret = nc_sock_accept_binds(server_opts.binds, server_opts.endpt_count, &server_opts.bind_lock, timeout, &host, &port, &bind_idx);
2306-
if (ret < 1) {
2306+
if (ret < 0) {
23072307
msgtype = (!ret ? NC_MSG_WOULDBLOCK : NC_MSG_ERROR);
23082308
goto cleanup;
23092309
}

0 commit comments

Comments
 (0)