[Zope-Checkins] SVN: Zope/branches/2.12/src/ZPublisher/BaseRequest.py update for r104360/104361: event subscribers might still need the zodb, so `clear` must not be called before `notify` as otherwise `self._held=None` might close the connection (refs LP #414757)
Andreas Zeidler
az at zitc.de
Thu Oct 15 07:03:28 EDT 2009
Log message for revision 105078:
update for r104360/104361: event subscribers might still need the zodb, so `clear` must not be called before `notify` as otherwise `self._held=None` might close the connection (refs LP #414757)
Changed:
U Zope/branches/2.12/src/ZPublisher/BaseRequest.py
-=-
Modified: Zope/branches/2.12/src/ZPublisher/BaseRequest.py
===================================================================
--- Zope/branches/2.12/src/ZPublisher/BaseRequest.py 2009-10-15 10:36:43 UTC (rev 105077)
+++ Zope/branches/2.12/src/ZPublisher/BaseRequest.py 2009-10-15 11:03:28 UTC (rev 105078)
@@ -211,8 +211,10 @@
self._held=None
def close(self):
+ notify(EndRequestEvent(None, self))
+ # subscribers might need the zodb, so `clear` must come afterwards
+ # (since `self._held=None` might close the connection, see above)
self.clear()
- notify(EndRequestEvent(None, self))
def processInputs(self):
"""Do any input processing that could raise errors
More information about the Zope-Checkins
mailing list