Skip to content

Commit 97c7b36

Browse files
committed
Fix: Read response exactly n bytes
1 parent e8a2b7c commit 97c7b36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aiosocks/protocols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def write_request(self, request):
150150

151151
@asyncio.coroutine
152152
def read_response(self, n):
153-
return (yield from self._stream_reader.read(n))
153+
return (yield from self._stream_reader.readexactly(n))
154154

155155
@asyncio.coroutine
156156
def _get_dst_addr(self):

0 commit comments

Comments
 (0)