瀏覽代碼

Fix variable closure binding

Rod Hynes 4 年之前
父節點
當前提交
0e9bede331
共有 1 個文件被更改,包括 2 次插入1 次删除
  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) {
 
+			logTunnelProtocol := tunnelProtocol
 			listener, err = quic.Listen(
 				CommonLogger(log),
 				func(clientAddress string, err error, logFields common.LogFields) {
 					logIrregularTunnel(
-						support, tunnelProtocol, listenPort, clientAddress,
+						support, logTunnelProtocol, listenPort, clientAddress,
 						errors.Trace(err), LogFields(logFields))
 				},
 				localAddress,