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:
@@ -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)
|
||||||
|
4
redis.go
4
redis.go
@@ -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
|
||||||
|
Reference in New Issue
Block a user