mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-05 20:55:47 +03:00
ssh2_exec: skip error outputs for EAGAIN
Since the example uses non-blocking mode, it will just flood the output with this "nonsense" error.
This commit is contained in:
@@ -264,6 +264,8 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if( rc != LIBSSH2_ERROR_EAGAIN )
|
||||||
|
/* no need to output this for the EAGAIN case */
|
||||||
fprintf(stderr, "libssh2_channel_read returned %d\n", rc);
|
fprintf(stderr, "libssh2_channel_read returned %d\n", rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user