diff --git a/apps/sam/python/src/i2p/socket.py b/apps/sam/python/src/i2p/socket.py
index c3609a8fe686f0568e5fd63ddf776f3c3cffc33b..ba31f3d01d55309ea4825f6a3ba4efd8df6ef0ff 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.