Skip to content

Commit

Permalink
release-2.0: storage: don't trip breaker if context is canceled
Browse files Browse the repository at this point in the history
This PR backports the idea behind cockroachdb#35433 to release-2.0.

Release note: None
  • Loading branch information
ajwerner committed Mar 11, 2019
1 parent 43cc479 commit c6faf2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/storage/raft_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ func (t *RaftTransport) connectAndProcess(
if consecFailures == 0 {
log.Warningf(ctx, "raft transport stream to node %d failed: %s", nodeID, err)
}
breaker.Fail(err)
if ctx.Err() == nil {
breaker.Fail(err)
}
}
}

Expand Down

0 comments on commit c6faf2a

Please sign in to comment.