From 59f029357663ff42ba0e9043dd53d5354e5f542d Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 7 Dec 2010 16:10:34 +0100 Subject: [PATCH] Fix from Oleksandr Shneyder http://www.libssh.org/archive/libssh/2010-11/0000005.html --- libssh/channels.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libssh/channels.c b/libssh/channels.c index 5ca3c574..d43ccaf1 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1392,11 +1392,13 @@ static ssh_channel channel_accept(ssh_session session, int channeltype, iterator = iterator->next; } } + if(t>0){ #ifdef _WIN32 - Sleep(50); /* 50ms */ + Sleep(50); /* 50ms */ #else - nanosleep(&ts, NULL); + nanosleep(&ts, NULL); #endif + } } return NULL;