Merge pull request #3337 from nats-io/allow-direct-default

On stream create, change AllowDirect set test on MaxMsgsPer to > 0
This commit is contained in:
Derek Collison
2022-08-04 17:46:52 -07:00
committed by GitHub

View File

@@ -1202,7 +1202,7 @@ func (s *Server) checkStreamCfg(config *StreamConfig, acc *Account) (StreamConfi
}
// Here we will auto set direct gets if MaxMsgsPerSubject is set.
if cfg.MaxMsgsPer != 0 {
if cfg.MaxMsgsPer > 0 {
cfg.AllowDirect = true
}