1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-10 18:10:54 +09:00

cleanup thread on error

This commit is contained in:
Sergey Cherepanov 2023-02-14 21:18:25 +03:00
parent 4cde54bdb3
commit 189922e534
No known key found for this signature in database
GPG key ID: 87F8EDE8FBDF637C

View file

@ -392,6 +392,10 @@ func (s *space) handleMessage(msg HandleMessage) {
}
if err := s.objectSync.HandleMessage(ctx, msg.SenderId, msg.Message); err != nil {
if msg.Message.ObjectId != "" {
// cleanup thread on error
_ = s.handleQueue.CloseThread(msg.Message.ObjectId)
}
log.InfoCtx(ctx, "handleMessage error", zap.Error(err))
}
}