Skip to content

Commit

Permalink
fix: unwanted error
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Mar 30, 2022
1 parent fa07030 commit e7346a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/pkg/bertyprotocol/store_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (m *MessageStore) processMessageLoop(ctx context.Context) error {
select {
case message = <-m.cmessage:
case <-ctx.Done():
return ctx.Err()
return nil
}

devicepk := string(message.headers.DevicePK)
Expand Down Expand Up @@ -402,7 +402,7 @@ func constructorFactoryGroupMessage(s *BertyOrbitDB, logger *zap.Logger) iface.S
}

go func() {
if err := store.processMessageLoop(ctx); err != nil {
if err := store.processMessageLoop(ctx); err != nil && err != context.Canceled {
logger.Error("process message loop error", zap.Error(err))
}
}()
Expand Down

0 comments on commit e7346a2

Please sign in to comment.