summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorJoseph Southwell <joseph@southwell.org>2014-02-02 19:25:16 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-02-02 22:19:46 +0100
commiteedecd02694cfba2796c79496e1d6c9ebc7ea97a (patch)
tree21bfc42393d988cf9658b7bc571bc1c1591a8f9f /src/client.c
parentd90478448985a1e21cc240fd87fc5a14b4bb978a (diff)
downloadlibssh-eedecd02694cfba2796c79496e1d6c9ebc7ea97a.tar.gz
libssh-eedecd02694cfba2796c79496e1d6c9ebc7ea97a.tar.xz
libssh-eedecd02694cfba2796c79496e1d6c9ebc7ea97a.zip
client: Fix EOF session error reporting.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c
index 2c9cc21a..a095fec5 100644
--- a/src/client.c
+++ b/src/client.c
@@ -544,7 +544,8 @@ pending:
}
SSH_LOG(SSH_LOG_PACKET,"Actual timeout : %d", timeout);
ret = ssh_handle_packets_termination(session, timeout, ssh_connect_termination, session);
- if (ret == SSH_ERROR || !ssh_connect_termination(session)) {
+ if (session->session_state != SSH_SESSION_STATE_ERROR &&
+ (ret == SSH_ERROR || !ssh_connect_termination(session))) {
ssh_set_error(session, SSH_FATAL,
"Timeout connecting to %s", session->opts.host);
session->session_state = SSH_SESSION_STATE_ERROR;