diff cli-session.c @ 754:2400b8685762

setup tcp after requesting a channel - might hide some DNS latency
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Apr 2013 07:51:13 +0800
parents d63ef1e211ea
children 7dcb46da72d9
line wrap: on
line diff
--- a/cli-session.c	Thu Apr 04 00:18:50 2013 +0800
+++ b/cli-session.c	Thu Apr 04 07:51:13 2013 +0800
@@ -266,13 +266,6 @@
 				}
 			}
 			
-#ifdef ENABLE_CLI_LOCALTCPFWD
-			setup_localtcp();
-#endif
-#ifdef ENABLE_CLI_REMOTETCPFWD
-			setup_remotetcp();
-#endif
-
 #ifdef ENABLE_CLI_NETCAT
 			if (cli_opts.netcat_host) {
 				cli_send_netcat_request();
@@ -281,6 +274,14 @@
 			if (!cli_opts.no_cmd) {
 				cli_send_chansess_request();
 			}
+
+#ifdef ENABLE_CLI_LOCALTCPFWD
+			setup_localtcp();
+#endif
+#ifdef ENABLE_CLI_REMOTETCPFWD
+			setup_remotetcp();
+#endif
+
 			TRACE(("leave cli_sessionloop: running"))
 			cli_ses.state = SESSION_RUNNING;
 			return;