What happens to async requests when the computer goes into Suspend?

I have a GNOME Shell extension in which I’m using Soup.Session.send_and_read_async to send a http request which takes seconds. Before I get the response, I put the computer in Suspend state. When I return I see the response had been received but the status was 0 and there were no cert errors. I was expecting status 200. Is this correct or am I doing something wrong?

I would expect the operation to fail with some sort of error.

Status 0 is SOUP_STATUS_NONE which means message has not been sent yet.

Thanks for replying. I’ve seen status 0 when there’s a TLS error too. In that case error flags are set and I’m wondering if there’s something similar set to detect it in this case.

I’m pretty surprised you don’t receive an error from soup_session_send_and_read_finish(). You are checking the error parameter, right?

I don’t see an error param. I’m going by DevDocs. My code’s at ca.footeware.gnomeshell.serverstatus/serverStatusPanel.js at d14a0d09330ef599f942b74df202131e8e43975b · CraigFoote/ca.footeware.gnomeshell.serverstatus · GitHub if it helps.

EDIT: Sorry I missed that you specified read_finish. I actually don’t call it because I make a HEAD call. I’ll get the result and check the error as you suggest. Thank you!