From e0d0b45b45a1c01a609d7106d667b6529ebbdf14 Mon Sep 17 00:00:00 2001 From: atjhoendz Date: Mon, 24 Jan 2022 18:09:57 +0700 Subject: [PATCH] fix: remove return when stream doesn't exist --- jetstream.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jetstream.go b/jetstream.go index 6d38241..23a0e01 100644 --- a/jetstream.go +++ b/jetstream.go @@ -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...)