Skip to content

Commit 9545f9c

Browse files
committed
fix: parse old NATS stream config if it exists
1 parent 9f68983 commit 9545f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

faststream/nats/broker/broker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,12 +623,12 @@ async def start(self) -> None:
623623
)
624624

625625
except BadRequestError as e:
626-
old_config = (await self.stream.stream_info(stream.name)).config
627-
628626
if (
629627
e.description
630628
== "stream name already in use with a different configuration"
631629
):
630+
old_config = (await self.stream.stream_info(stream.name)).config
631+
632632
self._log(str(e), logging.WARNING, log_context)
633633
await self.stream.update_stream(
634634
config=stream.config,

0 commit comments

Comments
 (0)