# HG changeset patch # User Matthew Wild # Date 1263931082 0 # Node ID cde876604bb735e1613c418259202d15a3aa7454 # Parent 2aeb55a51f472f2016a572722b6205802e1f94d5 s2smanager: Log error and fail gracefully if we can't open a socket for an outgoing s2s connection (thanks foucault) diff -r 2aeb55a51f47 -r cde876604bb7 core/s2smanager.lua --- a/core/s2smanager.lua Tue Jan 19 04:38:43 2010 +0000 +++ b/core/s2smanager.lua Tue Jan 19 19:58:02 2010 +0000 @@ -308,6 +308,11 @@ 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);