Skip to content

Commit

Permalink
apply timeouts only for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
CyAn84 committed Feb 13, 2025
1 parent 915c8f4 commit 9398e0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/core/ipcclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ bool IpcClient::init(IpcClient *instance)
Instance()->m_ClientNode.addClientSideConnection(Instance()->m_localSocket.data());

Instance()->m_ipcClient.reset(Instance()->m_ClientNode.acquire<IpcInterfaceReplica>());
#ifdef Q_OS_WIN
std::this_thread::sleep_for(std::chrono::seconds(2)); //< wait until client is ready
#endif

if (!Instance()->m_ipcClient) {
qFatal() << "IpcClient is not ready!";
Expand All @@ -60,8 +62,11 @@ bool IpcClient::init(IpcClient *instance)
}

Instance()->m_Tun2SocksClient.reset(Instance()->m_ClientNode.acquire<IpcProcessTun2SocksReplica>());

#ifdef Q_OS_WIN
std::this_thread::sleep_for(std::chrono::seconds(5)); //< wait until client is ready

#endif

if (!Instance()->m_Tun2SocksClient) {
qFatal() << "IpcClient::m_Tun2SocksClient is not ready!";
}
Expand Down

0 comments on commit 9398e0e

Please sign in to comment.