mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Core: don't expose "reconnect" optional param in public API
It was only meant to be used internally.
This commit is contained in:
parent
94775cebd8
commit
6ff40930c1
|
|
@ -70,7 +70,12 @@ namespace TgSharp.Core
|
||||||
this.sessionUserId = sessionUserId;
|
this.sessionUserId = sessionUserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task ConnectAsync(bool reconnect = false, CancellationToken token = default(CancellationToken))
|
public async Task ConnectAsync (CancellationToken token = default (CancellationToken))
|
||||||
|
{
|
||||||
|
await ConnectInternalAsync(false, token);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ConnectInternalAsync (bool reconnect = false, CancellationToken token = default (CancellationToken))
|
||||||
{
|
{
|
||||||
token.ThrowIfCancellationRequested();
|
token.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
|
|
@ -143,7 +148,7 @@ namespace TgSharp.Core
|
||||||
session.DataCenter = dataCenter;
|
session.DataCenter = dataCenter;
|
||||||
session.Save();
|
session.Save();
|
||||||
|
|
||||||
await ConnectAsync(true, token).ConfigureAwait(false);
|
await ConnectInternalAsync(true, token).ConfigureAwait(false);
|
||||||
|
|
||||||
if (session.TLUser != null)
|
if (session.TLUser != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue