aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-07-25 18:38:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-07-25 18:38:51 +0000
commitf36adcdb73608502e14a7a9401917925141cde3a (patch)
tree9fb8ca94a4c12522b08adfb2d117cc2342dea450 /lib/transfer.c
parent13616f8f96b12bbbec1ca40ea4356560a456cc11 (diff)
Georg Horn made the transfer timeout error message include more details
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c12
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;
}