reduce compare

This commit is contained in:
hebo
2019-12-06 14:30:10 +08:00
parent 67e917f4f3
commit dc7aa228c6

View File

@@ -339,7 +339,7 @@ func filterQueryPieceBySQL(mqp *model.PooledMysqlQueryPiece, querySQL []byte) (*
func (ms *MysqlSession) composeQueryPiece() (mqp *model.PooledMysqlQueryPiece) {
clientIP := ms.clientIP
clientPort := ms.clientPort
if clientIP == nil || len(*clientIP) < 1 {
if clientIP == nil {
clientIP = ms.srcIP
clientPort = ms.serverPort
}