Reconstruct properly

This commit is contained in:
Neil Alexander 2022-03-22 14:52:52 +00:00
parent 73afaeb82e
commit 1364d85985
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -92,10 +92,12 @@ func setupNATS(cfg *config.JetStream, nc *natsclient.Conn) (natsclient.JetStream
fallthrough
case info.Config.Storage != stream.Storage:
if err = s.DeleteStream(name); err != nil {
logrus.WithError(err).Fatal("Unable to recreate stream")
logrus.WithError(err).Fatal("Unable to delete stream")
}
info = nil
}
} else {
}
if info == nil {
// If we're trying to keep everything in memory (e.g. unit tests)
// then overwrite the storage policy.
if cfg.InMemory {