commit 58c788780bb54a114745a0ddf8fbe4666f20dd97 Author: Damian Johnson atagar@torproject.org Date: Mon Jan 1 12:08:46 2018 -0800
Drop max_response_size argument from RelaySocket's recv
Turns out endosome never actually used it. I'll need to ask Tim where the constant came from. --- stem/socket.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/stem/socket.py b/stem/socket.py index 20fbf6d0..fe902f0a 100644 --- a/stem/socket.py +++ b/stem/socket.py @@ -387,12 +387,10 @@ class RelaySocket(BaseSocket):
self._send(message, lambda s, sf, msg: _write_to_socket(sf, msg))
- def recv(self, max_response_size = MAX_READ_BUFFER_LEN): + def recv(self): """ Receives a message from the relay.
- :param int max_response_size: maximum bytes to return - :returns: bytes for the message received
:raises: @@ -400,10 +398,10 @@ class RelaySocket(BaseSocket): * :class:`stem.SocketClosed` if the socket closes before we receive a complete message """
- # TODO: Not really sure what we'll want here. To start with just copying - # endosome's behavior. + # TODO: Is MAX_READ_BUFFER_LEN defined in the spec? Not sure where it came + # from.
- return self._recv(lambda s, sf: s.recv(max_response_size)) + return self._recv(lambda s, sf: s.recv(MAX_READ_BUFFER_LEN))
def is_localhost(self): return self.address == '127.0.0.1'