Skip to content

Commit

Permalink
protocol: print error on protocol error
Browse files Browse the repository at this point in the history
... I'm actually not sure this is right.  I wonder what the C bridge did
in this case...
  • Loading branch information
allisonkarlitskaya committed Jul 8, 2024
1 parent 3b1fc45 commit 913ab48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cockpit/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def close(self, exc: 'Exception | None' = None) -> None:
return
self._closed = True

if isinstance(exc, CockpitProblem):
self.write_control(exc.get_attrs())

if self.transport:
self.transport.close()

Expand Down

0 comments on commit 913ab48

Please sign in to comment.