1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-21 20:53:41 +03:00

fix maintnotif pool hook

This commit is contained in:
Nedyalko Dyakov
2025-10-17 13:46:12 +03:00
parent acb55d8741
commit d74671b094
2 changed files with 5 additions and 3 deletions

View File

@@ -174,6 +174,10 @@ func (ph *PoolHook) OnPut(ctx context.Context, conn *pool.Conn) (shouldPool bool
return true, false, nil return true, false, nil
} }
func (ph *PoolHook) OnRemove(_ context.Context, _ *pool.Conn, _ error) {
// Not used
}
// Shutdown gracefully shuts down the processor, waiting for workers to complete // Shutdown gracefully shuts down the processor, waiting for workers to complete
func (ph *PoolHook) Shutdown(ctx context.Context) error { func (ph *PoolHook) Shutdown(ctx context.Context) error {
return ph.workerManager.shutdownWorkers(ctx) return ph.workerManager.shutdownWorkers(ctx)

View File

@@ -217,9 +217,7 @@ type baseClient struct {
pubSubPool *pool.PubSubPool pubSubPool *pool.PubSubPool
hooksMixin hooksMixin
onClose func() error // hook called when client is closed onClose func() error // hook called when client is closed
onCloseSlice []func() error
onCloseMu sync.Mutex
// Push notification processing // Push notification processing
pushProcessor push.NotificationProcessor pushProcessor push.NotificationProcessor