summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-17 09:38:09 +0800
committerruki <[email protected]>2022-04-17 09:38:09 +0800
commitf5eb360c282156f9d03a1111b8c7fce9030fb1db (patch)
tree70d2bcc872542f31570e862e84a5705690611c81 /xmake/modules
parentf7d9ecffa0b3479de5dc3a4dd96ea6ede7c18ea3 (diff)
improve disconnect
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/service/remote_build/client.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua
index efd88f519..dd335f272 100644
--- a/xmake/modules/private/service/remote_build/client.lua
+++ b/xmake/modules/private/service/remote_build/client.lua
@@ -124,7 +124,7 @@ function remote_build_client:disconnect()
end
local addr = self:addr()
local port = self:port()
- local sock = assert(socket.connect(addr, port), "%s: server unreachable!", self)
+ local sock = socket.connect(addr, port)
local session_id = self:session_id()
local errors
local ok = false
@@ -142,6 +142,10 @@ function remote_build_client:disconnect()
end
end
end
+ else
+ -- server unreachable, but we still disconnect it.
+ wprint("%s: server unreachable!", self)
+ ok = true
end
if ok then
print("%s: disconnected!", self)