From e5e85732d4cf528a27cfd7d24d92928d590dca0e Mon Sep 17 00:00:00 2001 From: sunshine <sunshine> Date: Tue, 3 Aug 2004 09:16:53 +0000 Subject: [PATCH] Oops, fixed one more bug --- apps/sam/python/src/i2p/socket.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/sam/python/src/i2p/socket.py b/apps/sam/python/src/i2p/socket.py index c3609a8fe6..ba31f3d01d 100644 --- a/apps/sam/python/src/i2p/socket.py +++ b/apps/sam/python/src/i2p/socket.py @@ -423,7 +423,10 @@ class Socket: if bufsize < -1: raise ValueError('bufsize must be >= -1 for packets') (data, addr) = self.sessobj.recv(timeout, peek) - return (data[:bufsize], addr) + if bufsize == -1: + return (data, addr) + else: + return (data[:bufsize], addr) def send(self, string, flags=0): """Sends string data to a remote Destination. -- GitLab