Simplify error checking and check the correct error

This commit is contained in:
Till Faelligen 2022-10-28 08:17:40 +02:00
parent a2706e6498
commit f6035822e7
No known key found for this signature in database
GPG Key ID: 3DF82D8AB9211D4E

View File

@ -101,7 +101,7 @@ func (p *PDUStreamProvider) CompleteSync(
) )
if jerr != nil { if jerr != nil {
req.Log.WithError(jerr).Error("p.getJoinResponseForCompleteSync failed") 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 return from
} }
continue continue