Await hangs sometimes #763
-
Hi, and thank you for this API. Have been using it for a while now. However, I seem to have one rare fault, that I can not pinpoint. Once every seconds I poll the data from Spotify, to update progress and player status. Rarely I get a Bad Gateway exception, but that I can catch and handle. But sometimes (we are talking hours/days inbetween), this await do not return, and my application hangs. I am considering implementing an timeout on all requests. But maybe it should be handled otherwise? Am also considering setting up a separate task, so that only this task hangs, not the whole application. So, if Spotify do not return, what do the API do awaiting the answer? Does it just wait forever, or is there a built in timeout? Any adwise would be aprediated :) Frank. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That does sound weird...are you always using I would also have to see some code to further Assist you |
Beta Was this translation helpful? Give feedback.
-
I can confirm, that I use asyns and await in all places - except one....... And its exactly where it hangs But due to the rest of my code, I can not make this function async..... So I am a little stuck.....
|
Beta Was this translation helpful? Give feedback.
That does sound weird...are you always using
async
andawait
? Using something like.Result
synchronously can lead to deadlocks.I would also have to see some code to further Assist you