# HG changeset patch # User Matthew Wild # Date 1293166562 0 # Node ID cc2e75e49cfbf4f5dfebf90eea2a6d4f1564fa18 # Parent d2f80697c3292b387d4346d318fbcd5e82ff286e s2smanager: new_outgoing(): Destroy session if first connection attempt fails immediately (e.g. can't create sockets) diff -r d2f80697c329 -r cc2e75e49cfb core/s2smanager.lua --- a/core/s2smanager.lua Fri Dec 24 04:52:40 2010 +0000 +++ b/core/s2smanager.lua Fri Dec 24 04:56:02 2010 +0000 @@ -190,7 +190,11 @@ 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