Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
berejant committed May 30, 2024
1 parent 2740d3a commit c19022d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion KafkaConsumerProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package framework
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/kneu-messenger-pigeon/events"
"github.com/segmentio/kafka-go"
Expand Down Expand Up @@ -71,7 +72,7 @@ func (processor *KafkaConsumerProcessor) Execute(ctx context.Context, wg *sync.W
}
}

if err != nil && err != context.Canceled {
if err != nil && !errors.Is(err, context.Canceled) {
_, _ = fmt.Fprintf(processor.out, "%T error: %v \n", processor.handler, err)
}
}
Expand Down

0 comments on commit c19022d

Please sign in to comment.