fix: connection not release after failure
This commit is contained in:
parent
74ab68b280
commit
e3e0ed0a91
|
@ -319,6 +319,9 @@ func (b *browserService) getRedisClient(server string, db int) (item *connection
|
|||
var connConfig = selConn.ConnectionConfig
|
||||
connConfig.LastDB = db
|
||||
client, err = b.createRedisClient(connConfig)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
ctx, cancelFunc := context.WithCancel(b.ctx)
|
||||
item = &connectionItem{
|
||||
client: client,
|
||||
|
|
Loading…
Reference in New Issue