Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mna committed Feb 3, 2020
1 parent 619557e commit 3ead169
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Package redisc implements a redis cluster client built on top of the [redigo pac

## Releases

* **v1.1.7** : Do not bind to a random node if `Do` is called without a command and the connection is not already bound (thanks to [@tysonmote][tysonmote]).

* **v1.1.6** : Append the actual error messages when a refresh returns "all nodes failed" error.

* **v1.1.5** : Add `Cluster.PoolWaitTime` to configure the time to wait on a connection from a pool with `MaxActive` > 0 and `Wait` set to true (thanks to [@iwanbk][iwanbk]).
Expand Down Expand Up @@ -77,3 +79,4 @@ The [BSD 3-Clause license][bsd].
[radix2]: https://github.com/mediocregopher/radix.v2
[letsfire]: https://github.com/letsfire
[iwanbk]: https://github.com/iwanbk
[tysonmote]: https://github.com/tysonmote
9 changes: 7 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,13 @@ func (c *Conn) DoWithTimeout(timeout time.Duration, cmd string, args ...interfac
// when returning a Redis conneciton back to the pool. If we recieve the
// blank command, don't bind to a random node if this connection is not bound
// yet.
if cmd == "" && c.rc == nil {
return nil, nil
if cmd == "" && len(args) == 0 {
c.mu.Lock()
rc := c.rc
c.mu.Unlock()
if rc == nil {
return nil, nil
}
}

rc, _, err := c.bind(cmdSlot(cmd, args))
Expand Down

0 comments on commit 3ead169

Please sign in to comment.