Skip to content
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

Deadlock (or something weird) when calling GetStringAsync #814

Closed
astrohart opened this issue Mar 23, 2024 · 2 comments
Closed

Deadlock (or something weird) when calling GetStringAsync #814

astrohart opened this issue Mar 23, 2024 · 2 comments

Comments

@astrohart
Copy link

I would ask on Stack OVerflow this question, but I don't have enough "reputation," to do so.

I am in a multithreaded environment. My code composes a Request and then it calls var responseBody = await request.GetStringAsync(); and them my logging lines stop echoing, and my code just kind of goes over into never-never land and my software just plain stops running.

Any guesses as to what I might potentially be doing wrong? Thank you.

@tmenier
Copy link
Owner

tmenier commented Mar 24, 2024

Are you trying to reuse the same Request? FlurlClient is safe for multi-threaded (re)use, but not FlurlRequest. You should create a new request with the shared client for each call you're making.

@tmenier
Copy link
Owner

tmenier commented Apr 12, 2024

Assuming this is resolved but if not feel free to reopen.

@tmenier tmenier closed this as completed Apr 12, 2024
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

No branches or pull requests

2 participants