Skip to content

Commit

Permalink
add forgotten set_close_reason for channel
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Feb 20, 2023
1 parent 60bfc1f commit 647f0b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aiormq/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ async def _on_cancel_frame(

async def _on_close_frame(self, frame: spec.Channel.Close) -> None:
exc: BaseException = exception_by_code(frame)
self.set_close_reason(
frame.reply_code or -1,
frame.reply_text or "",
frame.class_id or -1,
frame.method_id or -1
)
self.write_queue.put_nowait(
ChannelFrame.marshall(
channel_number=self.number,
Expand Down

0 comments on commit 647f0b8

Please sign in to comment.