I am having a hard time attempting to use Swift in a production app on Windows!
It turns out if your
URLSessionTask fails due to a timeout, instead of completing with an error I instead get a total crash.
I thought I'd see if I can use something that's a little more bare-metal like async-http-client only to realize there are some major blockers keeping it from building for Windows (mostly swift-nio issues).
Currently there is no pure-Swift way of making a web request guaranteed to not crash on Windows.
In my case, if a user blocks network access of my Swift-backed Windows software through a 3rd party tool or if my server times out for any reason, the crash happens.
P.S. I also get a similar full crash and burn upon attempting to
URLSessionTask of any kind on Windows...