[CalendarServer-changes] [14909] twext/branches/users/cdaboo/cfod/twext/enterprise/adbapi2.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 24 07:38:10 PDT 2015


Revision: 14909
          http://trac.calendarserver.org//changeset/14909
Author:   cdaboo at apple.com
Date:     2015-06-24 07:38:10 -0700 (Wed, 24 Jun 2015)
Log Message:
-----------
Prevent a connection leak when service is shut down while a connection setup is in progress.

Modified Paths:
--------------
    twext/branches/users/cdaboo/cfod/twext/enterprise/adbapi2.py

Modified: twext/branches/users/cdaboo/cfod/twext/enterprise/adbapi2.py
===================================================================
--- twext/branches/users/cdaboo/cfod/twext/enterprise/adbapi2.py	2015-06-23 18:03:33 UTC (rev 14908)
+++ twext/branches/users/cdaboo/cfod/twext/enterprise/adbapi2.py	2015-06-24 14:38:10 UTC (rev 14909)
@@ -1138,6 +1138,7 @@
 
         def finishInit((connection, cursor)):
             if txn._aborted:
+                connection.close()
                 return
             baseTxn = _ConnectedTxn(
                 pool=self,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150624/d941329b/attachment.html>


More information about the calendarserver-changes mailing list