You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static async Task Publish(string endpt, int db, string channel, String msg)
{
using (var bc = await _boostClientPool.CreateClientAsync(endpt, 6379, db))
{
return await bc.PublishAsync(channel, msg);
}
}
If for some reason an IO exception occurs in the PublishAsync call, I want the client instance to be removed from from the pool otherwise it gets readded when bc is disposed (because it's really a PooledRedisClient which returns itself to the pool on dispose). I've run into situations where this results in an unusable client instance (say due to prior disconnect) being pulled from the pool and failing for subsequent calls to Publish(). Is there a way to do this?
The text was updated successfully, but these errors were encountered:
I have code like this:
public static async Task Publish(string endpt, int db, string channel, String msg)
{
using (var bc = await _boostClientPool.CreateClientAsync(endpt, 6379, db))
{
return await bc.PublishAsync(channel, msg);
}
}
If for some reason an IO exception occurs in the PublishAsync call, I want the client instance to be removed from from the pool otherwise it gets readded when bc is disposed (because it's really a PooledRedisClient which returns itself to the pool on dispose). I've run into situations where this results in an unusable client instance (say due to prior disconnect) being pulled from the pool and failing for subsequent calls to Publish(). Is there a way to do this?
The text was updated successfully, but these errors were encountered: