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

Add ErrTxFailed. Small tweaks.

This commit is contained in:
Vladimir Mihailenco
2013-09-29 12:41:04 +03:00
parent 4c504ab528
commit 39c42d4389
7 changed files with 52 additions and 28 deletions

View File

@ -73,7 +73,7 @@ func (c *baseClient) init(cn *conn, password string, db int64) error {
}
func (c *baseClient) freeConn(cn *conn, err error) {
if err == Nil {
if err == Nil || err == TxFailedErr {
c.putConn(cn)
} else {
c.removeConn(cn)