mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
poll: return error on poll() when pollset is empty
This commit is contained in:
@@ -586,7 +586,7 @@ int ssh_poll_ctx_dopoll(ssh_poll_ctx ctx, int timeout) {
|
|||||||
int revents;
|
int revents;
|
||||||
|
|
||||||
if (!ctx->polls_used)
|
if (!ctx->polls_used)
|
||||||
return 0;
|
return SSH_ERROR;
|
||||||
|
|
||||||
rc = ssh_poll(ctx->pollfds, ctx->polls_used, timeout);
|
rc = ssh_poll(ctx->pollfds, ctx->polls_used, timeout);
|
||||||
if(rc < 0)
|
if(rc < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user