fall back to not panicking if replication isn't enabled...

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-03-26 20:34:49 -04:00
parent 325534a7d0
commit a91f4b6af8
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -337,7 +337,9 @@ func innerWatch(coll *mongo.Collection) {
}
stream, err := coll.Watch(context.TODO(), sspipeline, options.ChangeStream().SetFullDocument(options.UpdateLookup).SetFullDocumentBeforeChange(options.WhenAvailable))
panik(err)
if err != nil {
return
}
defer func(stream *mongo.ChangeStream, ctx context2.Context) {
err := stream.Close(ctx)
panik(err)