summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c
index da4636a..9af4e62 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -36,7 +36,7 @@ char *ssh_get_banner(SSH_SESSION *session){
char buffer[128];
int i = 0;
while (i < 127) {
- if(session->fd >=0 && read(session->fd, &buffer[i], 1)<=0){
+ if(session->fd <0 || read(session->fd, &buffer[i], 1)<=0){
ssh_set_error(session,SSH_FATAL,"Remote host closed connection");
return NULL;
}