1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Improve ReceiveMessage.

This commit is contained in:
Vladimir Mihailenco
2015-12-02 15:40:44 +02:00
parent 5efe0cceb6
commit 42141f11d1
4 changed files with 46 additions and 31 deletions

View File

@ -49,7 +49,8 @@ func (c *Client) Multi() *Multi {
func (c *Multi) putConn(cn *conn, ei error) {
var err error
if isBadConn(cn, ei) {
err = c.base.connPool.Remove(nil) // nil to force removal
// Close current connection.
c.base.connPool.(*stickyConnPool).Reset()
} else {
err = c.base.connPool.Put(cn)
}