Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 6e105a1

Browse files
committed
Don't pulse without a lock
1 parent 379f829 commit 6e105a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ServiceStack.Redis/PooledRedisClientManager.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,10 @@ public void DisposeClient(RedisNativeClient client)
385385
}
386386

387387
//Client not found in any pool, pulse both pools.
388-
Monitor.PulseAll(readClients);
389-
Monitor.PulseAll(writeClients);
388+
lock (readClients)
389+
Monitor.PulseAll(readClients);
390+
lock (writeClients)
391+
Monitor.PulseAll(writeClients);
390392
}
391393

392394
/// <summary>

0 commit comments

Comments
 (0)