From 4ad9c7e020f59e69f3d5ab7083635acde15dbeef Mon Sep 17 00:00:00 2001 From: retroNUC <71151161+retroNUC@users.noreply.github.com> Date: Tue, 24 Jan 2023 22:36:17 +0000 Subject: [PATCH] net_http - Temp fix for cheevos crash (#14742) (#14899) * net_http - Temp fix for cheevos crash (#14742) Don't use new timeout/poll code for cheevos http requests * net_http - Typo fix in comment --- libretro-common/net/net_http.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c index 3e3c81e872..ccbb52c309 100644 --- a/libretro-common/net/net_http.c +++ b/libretro-common/net/net_http.c @@ -440,7 +440,19 @@ static int net_http_new_socket(struct http_connection_t *conn) fd = -1; goto done; } - if (ssl_socket_connect(conn->sock_state.ssl_ctx, addr, true, true) + + /* TODO: Properly figure out what's going wrong when the newer + timeout/poll code interacts with mbed and winsock + https://github.com/libretro/RetroArch/issues/14742 */ + + /* Temp fix, don't use new timeout/poll code for cheevos http requests */ + bool timeout = true; +#ifdef __WIN32 + if (!strcmp(conn->domain, "retroachievements.org\0")) + timeout = false; +#endif + + if (ssl_socket_connect(conn->sock_state.ssl_ctx, addr, timeout, true) < 0) { fd = -1;