Browse Source

Fix: invalid closure

Rod Hynes 9 years ago
parent
commit
2abf3e4811
1 changed files with 3 additions and 3 deletions
  1. 3 3
      psiphon/server/tunnelServer.go

+ 3 - 3
psiphon/server/tunnelServer.go

@@ -938,10 +938,10 @@ func (sshClient *sshClient) runTunnel(
 
 		// process each port forward concurrently
 		waitGroup.Add(1)
-		go func() {
+		go func(channel ssh.NewChannel) {
 			defer waitGroup.Done()
-			sshClient.handleNewPortForwardChannel(newChannel)
-		}()
+			sshClient.handleNewPortForwardChannel(channel)
+		}(newChannel)
 	}
 
 	// The channel loop is interrupted by a client