mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Limit parallel transfers to 1 in HTTP mode
This commit is contained in:
parent
ddc0a3caef
commit
ccad6f9f31
|
|
@ -209,6 +209,7 @@ namespace WTelegram
|
|||
if (_tcpClient != null) throw new InvalidOperationException("Cannot switch to HTTP after TCP connection");
|
||||
_httpClient = httpClient ?? new();
|
||||
_httpWait = defaultHttpWait;
|
||||
while (_parallelTransfers.CurrentCount > 1) _parallelTransfers.Wait();
|
||||
}
|
||||
|
||||
/// <summary>Disconnect from Telegram <i>(shouldn't be needed in normal usage)</i></summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue