gblues 714878783a
Fix socket_connect_with_timeout for WIIU (#14483)
== DETAILS
Previous work to clean up the HTTP networking code surfaced a bug
in `socket_connect_with_timeout()` that caused connections to
immediately fail. Specifically, achievements stopped working because
the http task code path was rewritten to use
`socket_connect_with_timeout` instead of `socket_connect`.

The bug appears to come down to an unsupported socket option. The final
check is to try to read `SO_ERROR` from the socket, and on WIIU the
`getsockopt()` call returns -1 and sets `lastsocketerr()` (WIIU's
equivalent to errno) to 16.

The fix is to change the logic to only abort the connection if that
`getsockopt()` call succeeds *and* the error is set.
2022-10-06 17:01:19 +02:00
..