diff --git a/backend/services/browser_service.go b/backend/services/browser_service.go index 9fea2c4..27dbe63 100644 --- a/backend/services/browser_service.go +++ b/backend/services/browser_service.go @@ -251,6 +251,8 @@ func (b *browserService) getRedisClient(connName string, db int) (item connectio err = fmt.Errorf("create conenction error: %s", err.Error()) return } + + _ = client.Do(b.ctx, "CLIENT", "SETNAME", url.QueryEscape(selConn.Name)).Err() // add hook to each node in cluster mode var cluster *redis.ClusterClient if cluster, ok = client.(*redis.ClusterClient); ok { diff --git a/backend/services/connection_service.go b/backend/services/connection_service.go index 1a0c475..7d3f9b2 100644 --- a/backend/services/connection_service.go +++ b/backend/services/connection_service.go @@ -9,7 +9,6 @@ import ( "github.com/redis/go-redis/v9" "golang.org/x/crypto/ssh" "net" - "net/url" "os" "strings" "sync" @@ -120,7 +119,6 @@ func (c *connectionService) buildOption(config types.ConnectionConfig) (*redis.O } option := &redis.Options{ - ClientName: url.QueryEscape(config.Name), Addr: fmt.Sprintf("%s:%d", config.Addr, config.Port), Username: config.Username, Password: config.Password, @@ -174,7 +172,6 @@ func (c *connectionService) createRedisClient(config types.ConnectionConfig) (re //RouteByLatency: false, //RouteRandomly: false, //ClusterSlots: nil, - ClientName: url.QueryEscape(option.ClientName), Dialer: option.Dialer, OnConnect: option.OnConnect, Protocol: option.Protocol,