From 2dba4839addda32cf599328458d928172aaf4441 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 7 Dec 2010 16:13:40 +0100 Subject: Fix from Oleksandr Shneyder http://www.libssh.org/archive/libssh/2010-11/0000005.html --- src/channels.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/channels.c b/src/channels.c index ce94225..f447616 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1657,11 +1657,13 @@ static ssh_channel ssh_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; -- cgit