Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

TlSharp I haven't done anything yet, but Client.ConnectAsync is an error #1021

Open
jianwei923 opened this issue Apr 18, 2021 · 1 comment
Open

Comments

@jianwei923
Copy link

public async static void Init()
{
var client = new TelegramClient(123456, "aaabbbbbbccccccc");
await client.ConnectAsync();
}

Error:Unable to write data to the transport connection: The remote host forced closure of an existing connection

@aarani
Copy link
Contributor

aarani commented May 12, 2021

Your network is probably hostile toward telegram tcp traffic. We have a WIP commit here that changes the transport layer to websocket that might help you but It can't be said for certain because countries like Iran for example, actively drop any connection to telegram servers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants