Skip to content

Fix 'getFile' async request #131

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix 'getFile' async request #131

wants to merge 2 commits into from

Conversation

fannur
Copy link

@fannur fannur commented Mar 22, 2025

I don't know why this code not working correctly for 'getFile' endpoint.
Replacing the queue.async with DispatchQueue.global().async fixes this bug.

My system: MacBook 16 M1 Pro

@zmeyc
Copy link
Member

zmeyc commented Mar 22, 2025

This needs additional investigation, it shouldn't be dependent on queue

@zmeyc
Copy link
Member

zmeyc commented Mar 22, 2025

Could it be some issue with calling code? I.e. for example if it's calling a blocking version of the method on main thread

@zmeyc
Copy link
Member

zmeyc commented Mar 22, 2025

DispatchQueue.global().async doesn't make sense here as startDataTaskForEndpoint's callback is already on global queue (so directly calling completion() would have same effect), plus we must call the completion handler on the queue specified by caller (main queue by default).

@fannur
Copy link
Author

fannur commented Mar 23, 2025

I tested now 'sendMessage' and 'deleteMessage' both not working. 'getUpdate' working well.

code:
Снимок экрана 2025-03-23 в 9 59 56 AM

@fannur
Copy link
Author

fannur commented Mar 23, 2025

Full trace:
Снимок экрана 2025-03-23 в 10 14 05 AM

@zmeyc
Copy link
Member

zmeyc commented Mar 23, 2025

Is this reproducible in example apps?

@fannur
Copy link
Author

fannur commented Mar 23, 2025

I don't know. I'll try to try it later today.

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

Successfully merging this pull request may close these issues.

2 participants