314 (host_session.log or log)("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port); |
314 (host_session.log or log)("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port); |
315 -- Ok, we're going to try to connect |
315 -- Ok, we're going to try to connect |
316 |
316 |
317 local from_host, to_host = host_session.from_host, host_session.to_host; |
317 local from_host, to_host = host_session.from_host, host_session.to_host; |
318 |
318 |
319 local conn, handler = socket.tcp() |
319 local conn, handler = socket.tcp(); |
320 |
320 |
321 if not conn then |
321 if not conn then |
322 log("warn", "Failed to create outgoing connection, system error: %s", handler); |
322 log("warn", "Failed to create outgoing connection, system error: %s", handler); |
323 return false, handler; |
323 return false, handler; |
324 end |
324 end |