Commit 5cf04dac authored by Guido van Rossum's avatar Guido van Rossum

Fix a mysterious Windows hang: checkReconnectSwitch() would fail.

The fix is to change testConnection() to only retry the register()
call with the read-only flag set when we're not alrady connected.
But I don't understand why this fix is needed; I'll keep debugging.
parent 248ce69e
......@@ -13,7 +13,7 @@
##############################################################################
"""Network ZODB storage client
$Id: ClientStorage.py,v 1.60 2002/09/17 17:06:29 gvanrossum Exp $
$Id: ClientStorage.py,v 1.61 2002/09/18 21:17:48 gvanrossum Exp $
"""
# XXX TO DO
......@@ -199,7 +199,7 @@ class ClientStorage:
stub.register(str(self._storage), self._is_read_only)
return (stub, 1)
except POSException.ReadOnlyError:
if not self._read_only_fallback:
if not self._read_only_fallback or self.is_connected():
raise
log2(INFO, "Got ReadOnlyError; trying again with read_only=1")
stub.register(str(self._storage), read_only=1)
......
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