darkwallet / python-obelisk

Pure Python Obelisk + Bitcoin client side library
GNU Affero General Public License v3.0
62 stars 50 forks source link

Recursion Bug when fetching too much data #20

Open litecoin-extras opened 9 years ago

litecoin-extras commented 9 years ago

When socket reads too much data, ZmqSocket fails with a "maximum recursion error".

Please fix zmq_fallback.py from recursion to iterative like this:

def poll(self):
    while True:
        try:
            data = self._socket.recv(flags=zmq.NOBLOCK)
        except zmq.error.ZMQError:
            return
        more = self._socket.getsockopt(zmq.RCVMORE)
        self._cb(data, more)