Commit ab66c933 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 623c7f78
......@@ -173,7 +173,8 @@ class ZSync:
"""
def on_connection_resync(zsync):
print('ZSync.resync %r %r' % (zsync.zconn, zsync.wconn))
print('\nZZZSync.resync %r %r' % (zsync.zconn, zsync.wconn))
#import traceback; traceback.print_stack()
zsync.wconn.resync(zconn_at(zsync.zconn))
# TODO zconn dealloc -> wconn.close
......@@ -203,6 +203,7 @@ def Connection_onResyncCallback(self, f):
# NOTE WeakSet does not work for bound methods - they are always created
# anew for each obj.method access, and thus will go away almost immediately
self._onResyncCallbacks = WeakSet()
self._onResyncCallbacks.add(f)
assert not hasattr(ZODB.Connection.Connection, 'onResyncCallback')
ZODB.Connection.Connection.onResyncCallback = Connection_onResyncCallback
......
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