diff options
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r-- | cli-tcpfwd.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c index 3894044..3e87ffd 100644 --- a/cli-tcpfwd.c +++ b/cli-tcpfwd.c @@ -254,19 +254,7 @@ static int newtcpforwarded(struct Channel * channel) { } snprintf(portstring, sizeof(portstring), "%d", fwd->connectport); - sock = connect_remote(fwd->connectaddr, portstring, NULL); - if (sock < 0) { - TRACE(("leave newtcpdirect: sock failed")) - err = SSH_OPEN_CONNECT_FAILED; - goto out; - } - - ses.maxfd = MAX(ses.maxfd, sock); - - /* We don't set readfd, that will get set after the connection's - * progress succeeds */ - channel->writefd = sock; - channel->initconn = 1; + channel->conn_pending = connect_remote(fwd->connectaddr, portstring, channel_connect_done, channel); channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE; |