diff --git a/lib/telnet.c b/lib/telnet.c index 236e592860..6904c4ce36 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -1427,7 +1427,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) case WAIT_TIMEOUT: { for(;;) { - if(obj_count == 1) { + if(data->set.is_fread_set) { /* read from user-supplied method */ result = (int) conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in); if(result == CURL_READFUNC_ABORT) {