mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
socket: Fixed ssh_socket_poll().
If we don't have date to read or write, leave ssh_socket_poll().
This commit is contained in:
@@ -484,9 +484,14 @@ int ssh_socket_poll(struct socket *s, int *writeable, int *except) {
|
||||
|
||||
if (!s->data_to_read) {
|
||||
fd->events |= POLLIN;
|
||||
}
|
||||
if (!s->data_to_write) {
|
||||
} else if (!s->data_to_write) {
|
||||
fd->events |= POLLOUT;
|
||||
} else {
|
||||
*except = 1;
|
||||
*writeable = 0;
|
||||
|
||||
leave_function();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Make the call, and listen for errors */
|
||||
|
||||
Reference in New Issue
Block a user