aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index c7b950e2..8fa97c49 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -190,7 +190,11 @@ function new_outgoing(from_host, to_host, connect)
if connect ~= false then
-- Kick the connection attempting machine into life
- attempt_connection(host_session);
+ if not attempt_connection(host_session) then
+ -- Intentionally not returning here, the
+ -- session is needed, connected or not
+ destroy_session(host_session);
+ end
end
if not host_session.sends2s then