From 60387464391e1a8077bb9ef9e41e67347afc1d89 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 28 Nov 2024 07:36:41 -0500 Subject: [PATCH] Ignore BrokenPipeError --- lib/nntp/tiny/session.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/nntp/tiny/session.py b/lib/nntp/tiny/session.py index cb16389..7f3eaad 100644 --- a/lib/nntp/tiny/session.py +++ b/lib/nntp/tiny/session.py @@ -714,8 +714,11 @@ class Session(): def handle(self): self.greet() - while self.state & SessionState.ACTIVE: - self.handle_command() - self.flush() + try: + while self.state & SessionState.ACTIVE: + self.handle_command() + self.flush() - self.sock.close() + self.sock.close() + except BrokenPipeError: + pass