mirror of
https://github.com/redis/go-redis.git
synced 2025-12-03 18:31:14 +03:00
try to detect the deadlock x2
This commit is contained in:
@@ -75,6 +75,11 @@ func (mp *mockPool) Remove(ctx context.Context, conn *pool.Conn, reason error) {
|
||||
mp.removedConnections[conn.GetID()] = true
|
||||
}
|
||||
|
||||
func (mp *mockPool) RemoveWithoutTurn(ctx context.Context, conn *pool.Conn, reason error) {
|
||||
// For mock pool, same behavior as Remove since we don't have a turn-based queue
|
||||
mp.Remove(ctx, conn, reason)
|
||||
}
|
||||
|
||||
// WasRemoved safely checks if a connection was removed from the pool
|
||||
func (mp *mockPool) WasRemoved(connID uint64) bool {
|
||||
mp.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user