1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 06:43:12 +02:00

URL API: add request->connect_timeout & request->transfer_timeout

... in case you want to do fine-tuning.

Defaults to DOWNLOAD_CONNECT_TIMEOUT (15 seconds) and
DOWNLOAD_TRANSFER_TIMEOUT (20 seconds).

For example, the module manager uses a shorter timeout of 7 and 20.
(that was already the case, but now it uses the generic api so
 it needed an option to set it to those values)
This commit is contained in:
Bram Matthys
2023-11-24 14:34:54 +01:00
parent 9d3af7f22a
commit 7d024f8086
6 changed files with 23 additions and 13 deletions
+2
View File
@@ -1898,6 +1898,8 @@ struct OutgoingWebRequest
time_t cachetime;
int max_redirects;
int keep_file;
int connect_timeout; /**< How many seconds to wait for the (TLS) connect to succeed */
int transfer_timeout; /**< How many seconds the total transfer may take (connect+reading everything) */
// If you are adding allocated fields here:
// 1) update duplicate_outgoingwebrequest() in src/misc.c
// 2) and update url_free_handle_request_portion() there as well