Open n3nikita opened 4 years ago
What does this achieve? It just says "add handler", does this mean it is the fix for #668 and #777?
Yes. I've just PR the code from issue #668 which should fix error with code 32.
This is very weird code.
@CheshireCaat can you review?
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?
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
?
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.
@n3nikita ping
Add handler for exception with code 32. #668 and #777 issues.