Skip to content

Commit

Permalink
Fix timeouts causing clients to never receive an answer in pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickTaibel committed Feb 5, 2024
1 parent b65ff64 commit 2043bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func (this *Client) FlushRedisAndRespond() (err error) {

if err = protocol.CopyServerResponses(redisConn.Reader, this.Writer, numCommands); err != nil {
log.Error("Error when copying redis responses to client: %s. Disconnecting the connection.", err)
this.ReadChannel <- readItem{nil, err}
return
}

Expand Down
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ func (this *RedisMultiplexer) HandleError(client *Client, err error) {
client.Active = false
return
} else if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
// We had a read timeout. Let the client know that the connection is down
// We had a read timeout. Disconnect the client to ensure a known state.
graphite.Increment("nettimeout")
client.FlushError(ERR_TIMEOUT)
client.Active = false
return
} else {
// This is something we've never seen before! Panic panic panic
Expand Down

0 comments on commit 2043bba

Please sign in to comment.