From dc5a91f32630d7edfd89b5ffbd5813e6814d58a0 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sat, 24 Jun 2017 12:19:19 +0200 Subject: [PATCH] Remove stack depth warnings - I was never able to trigger them --- src/network/advanceddispatcher.py | 11 +++++------ src/network/receivequeuethread.py | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/network/advanceddispatcher.py b/src/network/advanceddispatcher.py index 61dd197b..1abc7975 100644 --- a/src/network/advanceddispatcher.py +++ b/src/network/advanceddispatcher.py @@ -41,14 +41,13 @@ class AdvancedDispatcher(asyncore.dispatcher): if not self.connected: return maxLoop = 20 - try: - sys._getframe(200) - logger.error("Stack depth warning") - except ValueError: - pass +# try: +# sys._getframe(200) +# logger.error("Stack depth warning") +# except ValueError: +# pass while maxLoop > 0: try: -# print "Trying to handle state \"%s\"" % (self.state) if getattr(self, "state_" + str(self.state))() is False: break except AttributeError: diff --git a/src/network/receivequeuethread.py b/src/network/receivequeuethread.py index 6662a078..8360ab45 100644 --- a/src/network/receivequeuethread.py +++ b/src/network/receivequeuethread.py @@ -25,11 +25,11 @@ class ReceiveQueueThread(threading.Thread, StoppableThread): while not self._stopped and state.shutdown == 0: if lastprinted < int(time.time()): lastprinted = int(time.time()) - try: - sys._getframe(200) - logger.error("Stack depth warning") - except ValueError: - pass +# try: +# sys._getframe(200) +# logger.error("Stack depth warning") +# except ValueError: +# pass processed = 0 for i in BMConnectionPool().inboundConnections.values() + BMConnectionPool().outboundConnections.values(): if self._stopped: