Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Simplify error checking and check the correct error
Browse files Browse the repository at this point in the history
  • Loading branch information
S7evinK committed Oct 28, 2022
1 parent a2706e6 commit f603582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syncapi/streams/stream_pdu.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (p *PDUStreamProvider) CompleteSync(
)
if jerr != nil {
req.Log.WithError(jerr).Error("p.getJoinResponseForCompleteSync failed")
if err == context.DeadlineExceeded || err == context.Canceled || err == sql.ErrTxDone {
if ctxErr := req.Context.Err(); ctxErr != nil || jerr == sql.ErrTxDone {
return from
}
continue
Expand Down

0 comments on commit f603582

Please sign in to comment.