aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index a24f2b2d..98203a7d 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -308,6 +308,11 @@ function make_connect(host_session, connect_host, connect_port)
local from_host, to_host = host_session.from_host, host_session.to_host;
local conn, handler = socket.tcp()
+
+ if not conn then
+ log("warn", "Failed to create outgoing connection, system error: %s", handler);
+ return false, handler;
+ end
conn:settimeout(0);
local success, err = conn:connect(connect_host, connect_port);