Ver Fonte

Fix: broken error check logic

Rod Hynes há 8 anos atrás
pai
commit
e8686da0a0
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      psiphon/server/tunnelServer.go

+ 1 - 1
psiphon/server/tunnelServer.go

@@ -1425,7 +1425,7 @@ func (sshClient *sshClient) runTunnel(
 				checkAllowedTCPPortFunc,
 				checkAllowedTCPPortFunc,
 				checkAllowedUDPPortFunc,
 				checkAllowedUDPPortFunc,
 				flowActivityUpdaterMaker)
 				flowActivityUpdaterMaker)
-			if err == nil {
+			if err != nil {
 				log.WithContextFields(LogFields{"error": err}).Warning("start packet tunnel client failed")
 				log.WithContextFields(LogFields{"error": err}).Warning("start packet tunnel client failed")
 				sshClient.setPacketTunnelChannel(nil)
 				sshClient.setPacketTunnelChannel(nil)
 			}
 			}