ConnectionHandler.writer can die without setting writer_stopped #36

Closed
nekto0n opened this Issue Oct 26, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@nekto0n

nekto0n commented Oct 26, 2012

Here's the trace with kazoo-0.8:

Traceback (most recent call last):
  File "/home/nekto0n/.local/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/nekto0n/.local/lib/python2.7/site-packages/kazoo/protocol/connection.py", line 397, in writer
    retry.increment()
  File "/home/nekto0n/.local/lib/python2.7/site-packages/kazoo/retry.py", line 54, in increment
    raise Exception("Too many retry attempts")
Exception: Too many retry attempts

hannosch added a commit that referenced this issue Nov 2, 2012

Issue #36: Correctly set `ConnectionHandler.writer_stopped` even if an
exception is raised inside the writer, like a retry operation failing.
@hannosch

This comment has been minimized.

Show comment Hide comment
@hannosch

hannosch Nov 2, 2012

Owner

I've wrapped the loop inside a try/finally, so the writer_stopped should always be set. I've also changed the exception raised inside the retry.increment into a more specialized exception (SHA1: 1763ed8) - which should make it easier to react to it.

Owner

hannosch commented Nov 2, 2012

I've wrapped the loop inside a try/finally, so the writer_stopped should always be set. I've also changed the exception raised inside the retry.increment into a more specialized exception (SHA1: 1763ed8) - which should make it easier to react to it.

@hannosch hannosch closed this Nov 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment