diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index c11b57b09..28e8e1885 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2685,8 +2685,6 @@ void CClient::InitInterfaces() m_DemoEditor.Init(m_pGameClient->NetVersion(), &m_SnapshotDelta, m_pConsole, m_pStorage); - m_Http.Init(std::chrono::seconds{1}); - m_ServerBrowser.SetBaseInfo(&m_aNetClient[CONN_CONTACT], m_pGameClient->NetVersion()); #if defined(CONF_AUTOUPDATE) @@ -2757,6 +2755,14 @@ void CClient::Run() } #endif + if(!m_Http.Init(std::chrono::seconds{1})) + { + const char *pErrorMessage = "Failed to initialize the HTTP client."; + log_error("client", "%s", pErrorMessage); + ShowMessageBox("HTTP Error", pErrorMessage); + return; + } + // init text render m_pTextRender = Kernel()->RequestInterface(); m_pTextRender->Init();