From 2bbe5a12acf31b8ab34855d19f706eefca6c9ab0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 6 Oct 2012 05:05:32 -0400 Subject: [PATCH] Enable us to see stack traces from with delivery threads when debuglvl > 0. --- irkerd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/irkerd b/irkerd index 34fb33a..59efc7b 100755 --- a/irkerd +++ b/irkerd @@ -254,9 +254,13 @@ class Connection: self.irker.debug(1, "XMIT_TTL bump (%s transmission) at %s" % (self.servername, time.asctime())) self.queue.task_done() except: - (exc_type, _exc_value, _exc_traceback) = sys.exc_info() + (exc_type, _exc_value, exc_traceback) = sys.exc_info() self.irker.logerr("exception %s in thread for %s" % \ (exc_type, self.servername)) + # This is so we can see tracebacks for errors inside the thread + # when we need to be able to for debugging purposes. + if debuglvl > 0: + raise exc_type, exc_value, exc_traceback def live(self): "Should this connection not be scavenged?" return self.status != "expired" -- 2.26.2