Skip to content

Commit

Permalink
perf: 简化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Mar 12, 2024
1 parent 1cef0b8 commit 7c0d725
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,8 @@ func (s *Server) checkRequiredAuth() error {
srvconn.ProtocolMongoDB,

srvconn.ProtocolMySQL, srvconn.ProtocolMariadb,
srvconn.ProtocolSQLServer, srvconn.ProtocolPostgresql:
if err := s.getAuthPasswordIfNeed(); err != nil {
msg := utils.WrapperWarn(lang.T("Get auth password failed"))
utils.IgnoreErrWriteString(s.UserConn, msg)
return fmt.Errorf("get auth password failed: %s", err)
}
case srvconn.ProtocolRedis:
srvconn.ProtocolSQLServer, srvconn.ProtocolPostgresql,
srvconn.ProtocolRedis:
if err := s.getAuthPasswordIfNeed(); err != nil {
msg := utils.WrapperWarn(lang.T("Get auth password failed"))
utils.IgnoreErrWriteString(s.UserConn, msg)
Expand Down

0 comments on commit 7c0d725

Please sign in to comment.