File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,16 +9,16 @@ import (
99
1010// https://sosedoff.com/2015/05/25/ssh-port-forwarding-with-go.html
1111func handleClient (client net.Conn , remote net.Conn ) {
12- defer client .Close ()
13- chDone := make (chan bool )
12+ // defer client.Close()
13+ // chDone := make(chan bool)
1414
1515 // Start remote -> local data transfer
1616 go func () {
1717 _ , err := io .Copy (client , remote )
1818 if err != nil {
1919 log .Println (fmt .Sprintf ("error while copy remote->local: %s" , err ))
2020 }
21- chDone <- true
21+ // chDone <- true
2222 }()
2323
2424 // Start local -> remote data transfer
@@ -27,8 +27,7 @@ func handleClient(client net.Conn, remote net.Conn) {
2727 if err != nil {
2828 log .Println (fmt .Sprintf ("error while copy local->remote: %s" , err ))
2929 }
30- chDone <- true
30+ // chDone <- true
3131 }()
32-
33- <- chDone
32+ //<-chDone
3433}
You can’t perform that action at this time.
0 commit comments