Skip to content

Commit

Permalink
No need for 'else if'
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
  • Loading branch information
timvaillancourt committed Dec 10, 2020
1 parent 2c63d88 commit 7900bdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/vt/vttablet/tabletserver/repltracker/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ func (p *poller) Status() (time.Duration, error) {

if status.HasReplicationSQLThreadError() {
return 0, vterrors.Errorf(vtrpcpb.Code_UNAVAILABLE, "replication sql thread error")
} else if !status.ReplicationRunning() {
}
if !status.ReplicationRunning() {
if p.timeRecorded.IsZero() {
return 0, vterrors.Errorf(vtrpcpb.Code_UNAVAILABLE, "replication is not running")
}
Expand Down

0 comments on commit 7900bdf

Please sign in to comment.