channels1: made channel_write1 nonblocking

This commit is contained in:
Aris Adamantiadis
2011-09-14 22:39:05 +02:00
parent 36ec488663
commit c4701a34d3

View File

@@ -291,8 +291,10 @@ int channel_write1(ssh_channel channel, const void *data, int len) {
if (packet_send(session) == SSH_ERROR) {
return -1;
}
ssh_handle_packets(session, SSH_TIMEOUT_NONBLOCKING);
}
if (ssh_blocking_flush(session,SSH_TIMEOUT_USER) == SSH_ERROR)
return -1;
return origlen;
}