Commit 5f62fd03 authored by Dieter Maurer's avatar Dieter Maurer

fix for https://bugs.launchpad.net/zodb/+bug/182833 (Severe ZEO protocol error)

Notes:
 I had to exclude 'kill_does_not_cause_cache_corruption (ZEO.tests.test_cache.__test__)' from the test as it deterministically hung on my platform (with or without my fix)
 Running the remaining test suite caused Ran 3279 tests with 5 failures and 0 errors in 17 minutes 31.116 seconds and one import problem -- all failures and problems in zope.testing-3.5.1-py2.4.egg, i.e. unrelated to my fix:
Tests with failures:
   /home/dieter/ZopeSVN/W/ZODB/eggs/zope.testing-3.5.1-py2.4.egg/zope/testing/testrunner-coverage.txt
   /home/dieter/ZopeSVN/W/ZODB/eggs/zope.testing-3.5.1-py2.4.egg/zope/testing/testrunner-debugging.txt
   /home/dieter/ZopeSVN/W/ZODB/eggs/zope.testing-3.5.1-py2.4.egg/zope/testing/testrunner-edge-cases.txt
   /home/dieter/ZopeSVN/W/ZODB/eggs/zope.testing-3.5.1-py2.4.egg/zope/testing/testrunner-layers-ntd.txt
   /home/dieter/ZopeSVN/W/ZODB/eggs/zope.testing-3.5.1-py2.4.egg/zope/testing/testrunner-colors.txt

Test-modules with import problems:
  zope.testing.testrunner.tests
parent 145a30d6
......@@ -298,11 +298,17 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
i += 1
# It is very unlikely that i will be 1.
v = "".join(output[:i])
# Note: "output" usually contains the output not yet sent
# The "del" below breaks this invariant temporarily.
# We must ensure its satisfaction again when we leave the loop
del output[:i]
try:
n = self.send(v)
except socket.error, err:
# Fix for https://bugs.launchpad.net/zodb/+bug/182833
# ensure the above mentioned "output" invariant
output.insert(0, v)
if err[0] in expected_socket_write_errors:
break # we couldn't write anything
raise
......
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