Skip to content

Commit

Permalink
fix: remove return when stream doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
atjhoendz committed Jan 24, 2022
1 parent 950a026 commit e0d0b45
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions jetstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ func (j *jsImpl) AddStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.St
return nil, ErrConnectionLost
}

streamInfo, err := j.jsCtx.StreamInfo(cfg.Name)
if err != nil {
return nil, err
}
streamInfo, _ := j.jsCtx.StreamInfo(cfg.Name)

if streamInfo == nil {
return j.jsCtx.AddStream(cfg, opts...)
Expand Down

0 comments on commit e0d0b45

Please sign in to comment.