Skip to content

Commit

Permalink
experimental work around for recursion issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Feb 11, 2014
1 parent a623f69 commit f73c141
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pika/adapters/blocking_connection.py
Expand Up @@ -18,6 +18,7 @@
import errno
from functools import wraps

from pika import frame
from pika import callback
from pika import channel
from pika import exceptions
Expand Down Expand Up @@ -405,9 +406,10 @@ def _send_frame(self, frame_value):
"""
super(BlockingConnection, self)._send_frame(frame_value)
self._frames_written_without_read += 1
if self._frames_written_without_read == self.WRITE_TO_READ_RATIO:
self._frames_written_without_read = 0
self.process_data_events()
if self._frames_written_without_read >= self.WRITE_TO_READ_RATIO:
if not isinstance(frame_value, frame.Method):
self._frames_written_without_read = 0
self.process_data_events()


class BlockingChannel(channel.Channel):
Expand Down

0 comments on commit f73c141

Please sign in to comment.