mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
chore: 再改一下截图超时的问题
This commit is contained in:
@@ -282,7 +282,7 @@ std::optional<std::vector<unsigned char>> asst::Controller::call_command(const s
|
||||
fd_set fdset = { 0 };
|
||||
FD_SET(m_server_sock, &fdset);
|
||||
constexpr int TimeoutMilliseconds = 10000;
|
||||
timeval select_timeout = { TimeoutMilliseconds / 1000, 0 };
|
||||
timeval select_timeout = { TimeoutMilliseconds / 1000, (TimeoutMilliseconds % 1000) * 1000};
|
||||
select(static_cast<int>(m_server_sock) + 1, &fdset, NULL, NULL, &select_timeout);
|
||||
if (FD_ISSET(m_server_sock, &fdset)) {
|
||||
SOCKET client_sock = ::accept(m_server_sock, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user