Skip to content

Commit

Permalink
add forgotten set_close_reason
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Feb 20, 2023
1 parent de5785e commit 60bfc1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion aiormq/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,14 @@ async def __handle_heartbeat(self, _: Heartbeat) -> None:
return

async def __handle_close(self, frame: spec.Connection.Close) -> None:
log.exception(
self.set_close_reason(
frame.reply_code or -1,
frame.reply_text or "",
frame.class_id or -1,
frame.method_id or -1,
)

log.error(
"Unexpected connection close from remote \"%s\", "
"Connection.Close(reply_code=%r, reply_text=%r)",
self, frame.reply_code, frame.reply_text,
Expand Down

0 comments on commit 60bfc1f

Please sign in to comment.