diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 80ce64a33f..2ee2e1cf1e 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -545,7 +545,7 @@ static void server_list_fetch_servers_begin() _serverList.ReadAndAddFavourites(); _statusText = STR_SERVER_LIST_CONNECTING; - _fetchFuture = std::async([] { + _fetchFuture = std::async(std::launch::async, [] { // Spin off background fetches auto lanF = _serverList.FetchLocalServerListAsync(); auto wanF = _serverList.FetchOnlineServerListAsync(); diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index 324d431b3e..544d795892 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -237,7 +237,7 @@ bool ServerList::WriteFavourites(const std::vector& entries) std::future> ServerList::FetchLocalServerListAsync(const INetworkEndpoint& broadcastEndpoint) { auto broadcastAddress = broadcastEndpoint.GetHostname(); - return std::async([broadcastAddress] { + return std::async(std::launch::async, [broadcastAddress] { constexpr auto RECV_DELAY_MS = 10; constexpr auto RECV_WAIT_MS = 2000; @@ -287,7 +287,7 @@ std::future> ServerList::FetchLocalServerListAsync( std::future> ServerList::FetchLocalServerListAsync() { - return std::async([&] { + return std::async(std::launch::async, [&] { // Get all possible LAN broadcast addresses auto broadcastEndpoints = GetBroadcastAddresses();