Browse Source

Fix variable closure binding

Rod Hynes 4 years ago
parent
commit
0e9bede331
1 changed files with 2 additions and 1 deletions
  1. 2 1
      psiphon/server/tunnelServer.go

+ 2 - 1
psiphon/server/tunnelServer.go

@@ -161,11 +161,12 @@ func (server *TunnelServer) Run() error {
 
 
 		} else if protocol.TunnelProtocolUsesQUIC(tunnelProtocol) {
 		} else if protocol.TunnelProtocolUsesQUIC(tunnelProtocol) {
 
 
+			logTunnelProtocol := tunnelProtocol
 			listener, err = quic.Listen(
 			listener, err = quic.Listen(
 				CommonLogger(log),
 				CommonLogger(log),
 				func(clientAddress string, err error, logFields common.LogFields) {
 				func(clientAddress string, err error, logFields common.LogFields) {
 					logIrregularTunnel(
 					logIrregularTunnel(
-						support, tunnelProtocol, listenPort, clientAddress,
+						support, logTunnelProtocol, listenPort, clientAddress,
 						errors.Trace(err), LogFields(logFields))
 						errors.Trace(err), LogFields(logFields))
 				},
 				},
 				localAddress,
 				localAddress,