-
Notifications
You must be signed in to change notification settings - Fork 380
Connection problem with emirati number #935
Comments
looks like that the big problem is happening with the DC 149.154.165.120 in fact, if i start the software with this default ip address, the migration to a new DC is not requested and the library immediately fails with the above exception @aarani please help bro! thanks |
you could click on the diff and extract it as a patch |
no luck, i have been trying for more than 1 hour, i am not able to download this thing. i give up. if @aarani is so kind to send me a copy, i'll be happy to try. i even checked "see the repo at this time": https://github.com/sochix/TLSharp/tree/2d9aa26ba22702e64b356e98a1600c189482ce27 |
Download this with curl or wget: https://github.com/sochix/TLSharp/commit/2d9aa26ba22702e64b356e98a1600c189482ce27.patch then apply it to your tree |
|
by the way, this problem seems to be connected with DataCenter number 5. maybe also others, i don't know. dc4 is working fine |
How are you applying the patch? Anyway, regardless of this, what happens is that the 2d9aa26 commit needs to be applied into a previous commit, not current master. So, first, checkout this commit in your local clone: f24da2c, and after that, apply the patch. |
git apply |
same exception Furthermore, there is a new bug in this code
the call ConnectAsync might not end before someone calls send on the TcpTransport, causing an exception. |
everything works if telegram migrates the communication to DC4. With other datacenters it doesn't work. |
i think i understood why this is happening :D let me see |
yes, filtering the MediaOnly also fixes the problem, but ReconnectToDcAsync should also be fixed because it creates a TcpTransport, then it calls ConnectAsync which basically reloads the session with the old datacenter address and recreates a new TcpTransport. my proposed solution is that ReconnectToDcAsync does not recreate a TcpTransport, but saves the session after updating the new datacenter. then everything stays as it is. this is compatible with #939 and/or #937 please @knocte check asap and let's address this boring issue. we need either #939 or #937 for this fix |
Not sure what you mean by this. When explaining changes to the code, it's better to post a diff than using prose.
You mean this change?:
|
i just added
after all the if-else but there is also the ReconnectToDcAsync to change. i'll make a pr later. if i am still alive. debugging this thing is more difficult than my project :D |
Fixes sochix#935 (This commit was brought from TLSharp [1] version 0.1.0.554.) [1] sochix@9a6e391
i can't manage to connect with my Emiratis telephone numbers.
i tried 2 numbers, both same problem, same exception.
The text was updated successfully, but these errors were encountered: