-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnaryAsyncWrapper resume its continuation more than once #333
Comments
👋🏽 hi @remstos - thank you for flagging this issue! Can you share a bit more about how you're cancelling these requests? If you are able to put together an example (even if it inconsistently reproduces) within the Eliza example app in this repo, that would be super helpful as well. |
hi @rebello95 we are also encountering this issue and every time it happens is because of timeout error. As mentioned by the author, you can reproduce it by making the timeout of requests somewhere around 5-6s. So I assume that the author, like us is not manually cancelling the requests, they are cancelled automatically because of timeout. |
@dan-zy-y @remstos Can you clarify two things for me?
|
Hi,
We’re seeing quite a lot of random cases of the UnaryAsyncWrapper calling its continuation twice.
From our investigation, we could see that often it is happening when the request was actually cancelled and then its an error.
So something like this flow :
UnaryAsyncWrapper.swift Line 52
Reproducibility
I was able to reproduce unconsistently, by
It is not consistent so I’m guessing there’s a race depending on how fast we’re cancelling the request.
I was trying to implement a fix, but I’m not sure what would be the best way to check that whether or not the cancelable closure has been canceled or not.
Thanks for any help here 🙏
The text was updated successfully, but these errors were encountered: