This commit is contained in:
MichaelManley 2017-11-08 15:19:56 +00:00 committed by GitHub
commit b740546bf5

View file

@ -305,20 +305,24 @@ namespace TLSharp.Core
var serverPort = _session.Port; var serverPort = _session.Port;
await ReconnectToDcAsync(ex.DC); await ReconnectToDcAsync(ex.DC);
var auth = await SendRequestAsync<TLAuthorization>(new TLRequestImportAuthorization try
{ {
bytes = exportedAuth.bytes, var auth = await SendRequestAsync<TLAuthorization>(new TLRequestImportAuthorization
id = exportedAuth.id {
}); bytes = exportedAuth.bytes,
result = await GetFile(location, filePartSize, offset); id = exportedAuth.id
});
_session.AuthKey = authKey; result = await GetFile(location, filePartSize, offset);
_session.TimeOffset = timeOffset; }
_transport = new TcpTransport(serverAddress, serverPort); finally
_session.ServerAddress = serverAddress; {
_session.Port = serverPort; _session.AuthKey = authKey;
await ConnectAsync(); _session.TimeOffset = timeOffset;
_transport = new TcpTransport(serverAddress, serverPort);
_session.ServerAddress = serverAddress;
_session.Port = serverPort;
await ConnectAsync();
}
} }
return result; return result;