diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 0af351042..2ea07592d 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1419,9 +1419,15 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (data->set.timeout && ((Curl_tvdiff(k->now, k->start)/1000) >= data->set.timeout)) { - failf(data, "Operation timed out with %" FORMAT_OFF_T - " out of %" FORMAT_OFF_T " bytes received", - k->bytecount, conn->size); + if (conn->size != -1) { + failf(data, "Operation timed out after %d seconds with %" + FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received", + data->set.timeout, k->bytecount, conn->size); + } else { + failf(data, "Operation timed out after %d seconds with %" + FORMAT_OFF_T " bytes received", + data->set.timeout, k->bytecount); + } return CURLE_OPERATION_TIMEOUTED; } |