poll: return error on poll() when pollset is empty

(cherry picked from commit 222a0d78ca)
This commit is contained in:
Aris Adamantiadis
2013-02-11 21:35:50 +01:00
committed by Andreas Schneider
parent bbdef245a1
commit 5826cb6ab2

View File

@@ -581,7 +581,7 @@ int ssh_poll_ctx_dopoll(ssh_poll_ctx ctx, int timeout) {
int revents;
if (!ctx->polls_used)
return 0;
return SSH_ERROR;
rc = ssh_poll(ctx->pollfds, ctx->polls_used, timeout);
if(rc < 0)