Commit 7946bcb3 authored by Jim Fulton's avatar Jim Fulton

Added logic to avoid spurious errors from the logging system on exit.

parent 05cf02d4
What's new on ZODB 3.7.0b3?
What's new on ZODB 3.7.0b4?
===========================
Packaging
......@@ -19,6 +20,9 @@ Packaging
ClientStorage
-------------
- (3.7b4) Added logic to avoid spurious errors from the logging system
on exit.
- (3.7b2) Removed the "sync" mode for ClientStorage.
Previously, a ClientStorage could be in either "sync" mode or "async"
......
......@@ -12,6 +12,7 @@
#
##############################################################################
import asyncore
import atexit
import errno
import select
import sys
......@@ -39,6 +40,7 @@ client_timeout_count = 0 # for testing
client_map = {}
client_trigger = trigger(client_map)
client_logger = logging.getLogger('ZEO.zrpc.client_loop')
atexit.register(client_map.clear)
def client_loop():
map = client_map
......@@ -106,8 +108,13 @@ def client_loop():
_exception(obj)
except:
if map:
try:
client_logger.critical('The ZEO cient loop failed.',
exc_info=sys.exc_info())
except:
pass
for fd, obj in map.items():
if obj is client_trigger:
continue
......@@ -115,8 +122,11 @@ def client_loop():
obj.mgr.client.close()
except:
map.pop(fd, None)
try:
client_logger.critical("Couldn't close a dispatcher.",
exc_info=sys.exc_info())
except:
pass
client_thread = threading.Thread(target=client_loop)
client_thread.setDaemon(True)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment