X Tutup
Skip to content

Commit dddeaa7

Browse files
author
stroeder
committed
__del__() is not called always which sometimes breaks database => use separate method SyncReplConsumer.close_db()
1 parent 98c55a1 commit dddeaa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Demo/pyasn1/syncrepl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self,db_path,*args,**kwargs):
4343
# We need this for later internal use
4444
self.__presentUUIDs = dict()
4545

46-
def __del__(self):
46+
def close_db(self):
4747
# Close the data store properly to avoid corruption
4848
self.__data.close()
4949

@@ -109,6 +109,7 @@ def commenceShutdown(signum, stack):
109109

110110
# Tear down the server connection
111111
if( ldap_connection ):
112+
ldap_connection.close_db()
112113
del ldap_connection
113114

114115
# Shutdown

0 commit comments

Comments
 (0)
X Tutup