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

add handler for exception with code 32 #910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

n3nikita
Copy link

Add handler for exception with code 32. #668 and #777 issues.

@knocte
Copy link
Collaborator

knocte commented Feb 23, 2020

What does this achieve? It just says "add handler", does this mean it is the fix for #668 and #777?

@n3nikita
Copy link
Author

Yes. I've just PR the code from issue #668 which should fix error with code 32.

@knocte
Copy link
Collaborator

knocte commented Feb 24, 2020

This is very weird code.

@CheshireCaat can you review?

@CheshireCaat
Copy link
Contributor

I think there is a more correct way to get rid of this error. How can I repeat it to make sure that this solution is right?

@CheshireCaat
Copy link
Contributor

Okay, I looked at issues related to this problem, I think we need a more global solution for working with parallel requests as well.
Maybe it will be better to add something like SemaphoreSlim to the SendRequestAsync or RequestWithDcMigration?

@CheshireCaat
Copy link
Contributor

Now the code from the example below will throw errors

await Task.WhenAll(Enumerable.Range(1, 5).Select(arg => Client.CheckUsernameAsync("CheshireCaat")))

I tested it also with modified RequestWithDcMigration with SemaphoreSlim - it works fine.
Can you check your error by adding Semaphore? If this helps, I think it's better to do it that way.

@CheshireCaat
Copy link
Contributor

@n3nikita ping

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

Successfully merging this pull request may close these issues.

None yet

3 participants