diff options
| author | ruki <[email protected]> | 2022-07-05 23:17:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-05 23:17:48 +0800 |
| commit | 5ad5e57ffd468bdec13f292773c7413201a68184 (patch) | |
| tree | 996c251055ed5a3f51dcf056da8f3e0cff41167a | |
| parent | b1d48494ee6f4daaa6daae840c0bb2dd42ee64b6 (diff) | |
improve timeout configs
6 files changed, 24 insertions, 0 deletions
diff --git a/xmake/modules/private/service/distcc_build/client.lua b/xmake/modules/private/service/distcc_build/client.lua index 85d82a9c3..e51f6391c 100644 --- a/xmake/modules/private/service/distcc_build/client.lua +++ b/xmake/modules/private/service/distcc_build/client.lua @@ -55,6 +55,10 @@ function distcc_build_client:init() else raise("we need enter a project directory with xmake.lua first!") end + + -- init timeout + self._SEND_TIMEOUT = config.get("distcc_build.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("distcc_build.recv_timeout") or config.get("recv_timeout") or -1 end -- get class diff --git a/xmake/modules/private/service/distcc_build/server.lua b/xmake/modules/private/service/distcc_build/server.lua index 0207761a1..68e14de8f 100644 --- a/xmake/modules/private/service/distcc_build/server.lua +++ b/xmake/modules/private/service/distcc_build/server.lua @@ -43,6 +43,10 @@ function distcc_build_server:init(daemon) -- init sessions self._SESSIONS = {} + + -- init timeout + self._SEND_TIMEOUT = config.get("distcc_build.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("distcc_build.recv_timeout") or config.get("recv_timeout") or -1 end -- get class diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua index 13018a970..a665b2634 100644 --- a/xmake/modules/private/service/remote_build/client.lua +++ b/xmake/modules/private/service/remote_build/client.lua @@ -60,6 +60,10 @@ function remote_build_client:init() filesync:ignorefiles_add(".git/**") filesync:ignorefiles_add(".xmake/**") self._FILESYNC = filesync + + -- init timeout + self._SEND_TIMEOUT = config.get("remote_build.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("remote_build.recv_timeout") or config.get("recv_timeout") or -1 end -- get class diff --git a/xmake/modules/private/service/remote_build/server.lua b/xmake/modules/private/service/remote_build/server.lua index 42e0e401c..52015c7f2 100644 --- a/xmake/modules/private/service/remote_build/server.lua +++ b/xmake/modules/private/service/remote_build/server.lua @@ -43,6 +43,10 @@ function remote_build_server:init(daemon) -- init sessions self._SESSIONS = {} + + -- init timeout + self._SEND_TIMEOUT = config.get("remote_build.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("remote_build.recv_timeout") or config.get("recv_timeout") or -1 end -- get class diff --git a/xmake/modules/private/service/remote_cache/client.lua b/xmake/modules/private/service/remote_cache/client.lua index 4c35b6411..1b3656eaa 100644 --- a/xmake/modules/private/service/remote_cache/client.lua +++ b/xmake/modules/private/service/remote_cache/client.lua @@ -58,6 +58,10 @@ function remote_cache_client:init() -- init sockets self._FREESOCKS = {} self._OPENSOCKS = hashset.new() + + -- init timeout + self._SEND_TIMEOUT = config.get("remote_cache.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("remote_cache.recv_timeout") or config.get("recv_timeout") or -1 end -- get class diff --git a/xmake/modules/private/service/remote_cache/server.lua b/xmake/modules/private/service/remote_cache/server.lua index ec4a31f67..defb0992e 100644 --- a/xmake/modules/private/service/remote_cache/server.lua +++ b/xmake/modules/private/service/remote_cache/server.lua @@ -43,6 +43,10 @@ function remote_cache_server:init(daemon) -- init sessions self._SESSIONS = {} + + -- init timeout + self._SEND_TIMEOUT = config.get("remote_cache.send_timeout") or config.get("send_timeout") or -1 + self._RECV_TIMEOUT = config.get("remote_cache.recv_timeout") or config.get("recv_timeout") or -1 end -- get class |
