diff options
-rw-r--r-- | lib/telnet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/telnet.c b/lib/telnet.c index be3e904bf..236e59286 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -1439,8 +1439,10 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) if(result == CURL_READFUNC_PAUSE) break; - if(result == 0) /* no bytes */ + if(result == 0) { /* no bytes, means end-of-file */ + keepon = FALSE; break; + } readfile_read = result; /* fall thru with number of bytes read */ } |