mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-03 13:16:35 +08:00
fix: some issue
This commit is contained in:
@@ -18,7 +18,7 @@ func GetMachineCli(ctx context.Context, authCertName string, getMachine func(str
|
||||
return nil, err
|
||||
}
|
||||
mi.Key = authCertName
|
||||
return mi.Conn(ctx)
|
||||
return mi.Conn(context.Background())
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
@@ -31,9 +31,10 @@ func GetMachineCli(ctx context.Context, authCertName string, getMachine func(str
|
||||
// 删除指定机器缓存客户端,并关闭客户端连接
|
||||
func DeleteCli(id uint64) {
|
||||
for _, pool := range poolGroup.AllPool() {
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
conn, err := pool.Get(ctx)
|
||||
if pool.Stats().TotalConns == 0 {
|
||||
continue
|
||||
}
|
||||
conn, err := pool.Get(context.Background())
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user