fix: crashing bug on partial backup (#39)

This commit is contained in:
Gareth
2023-12-23 01:49:39 -08:00
committed by GitHub
parent df9e0aec90
commit fba6c8da86
7 changed files with 35 additions and 36 deletions

View File

@@ -193,11 +193,9 @@ func (s *Server) GetOperationEvents(ctx context.Context, req *connect.Request[em
return
}
go func() {
if err := resp.Send(event); err != nil {
errorChan <- fmt.Errorf("failed to send event: %w", err)
}
}()
if err := resp.Send(event); err != nil {
errorChan <- fmt.Errorf("failed to send event: %w", err)
}
}
s.oplog.Subscribe(&callback)
defer s.oplog.Unsubscribe(&callback)