Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 5, 2021. It is now read-only.
/TLSharpPublic archive

Fix issue with leaving session in a invalid state if GetFile throws an exception after reconnecting to another DC#548

Open
MichaelManley wants to merge1 commit intosochix:master
base:master
Choose a base branch
Loading
fromMichaelManley:GetFileDCReconnectFix

Conversation

MichaelManley
Copy link

In TelegramClient.GetFile, if the file is in another DC, it reconnects to the DC to be able to get the file. In an exception is thrown after that whilst trying to download the file it doesn't reconnect to the original DC which leaves the session in an invalid state.

This wraps the calls after the ReconnectToDCAs in a try finally to ensure that whatever happens we always try to do the reconnect to the original DC.

…econnect to original DC even if there is an exception
@knocte
Copy link
Collaborator

@sochix can you review?

Copy link

@andreysolovyovandreysolovyov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Tried to apply this fix, but get same result. After first uncatched exception session corrupted and every request ends with "can't read packet" exception. Do we need to make some migration calls after restoring session in final section?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@andreysolovyovandreysolovyovandreysolovyov left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@MichaelManley@knocte@andreysolovyov

[8]ページ先頭

©2009-2025 Movatter.jp