Issue #11 new

Sending big documents through a network fails

Pablo Díaz Ogni
created an issue

Hi, i'm using stompy library with an activemq located in another computer. Doing several tests, i've realiased that calling sock.sendall(frame) without blocking the socket before raise a socket.error exception.

I've fixed the problem by adding the following bold lines in the file frame.py, line 244, but i'm not sure that this is the best solution.

def send_frame(self, frame): """Send frame to server, get receipt if needed.

:param frame: :class:`Frame` instance to pass across the socket

"""
**self.sock.setblocking(True)**
self.sock.sendall(frame)
**self.sock.setblocking(False)

**

Please, send me an email to pablodo@olx.com in order to discuss this and find a better solution. Thank you

Comments (1)

  1. Log in to comment