mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 09:22:21 +00:00
refactor: extract and validate HTTP timeout, ensuring a positive default value.
This commit is contained in:
parent
208aad107e
commit
8c576249b3
@ -95,9 +95,13 @@ namespace JackTor
|
||||
try
|
||||
{
|
||||
_onLog?.Invoke($"JackTor: запит до Jackett -> {query}");
|
||||
int timeoutSeconds = Convert.ToInt32(_init.httptimeout);
|
||||
if (timeoutSeconds <= 0)
|
||||
timeoutSeconds = 12;
|
||||
|
||||
var root = await Http.Get<JackettSearchRoot>(
|
||||
_init.cors(url),
|
||||
timeoutSeconds: _init.httptimeout > 0 ? _init.httptimeout : 12,
|
||||
timeoutSeconds: timeoutSeconds,
|
||||
headers: headers,
|
||||
proxy: _proxyManager.Get()
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user