Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic182 committed Jan 21, 2024
1 parent e272e0e commit ba3d43d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiosonic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ async def _do_request(

# get response code and version
try:
line = await wait_for(connection.readline(), timeouts.sock_read)
line = await wait_for(connection.readuntil(), timeouts.sock_read)
if not line:
raise HttpParsingError(f"response line parsing error: {line}")
response._set_response_initial(line)
Expand Down
2 changes: 1 addition & 1 deletion aiosonic/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def readexactly(self, size: int):
raise MissingReaderException("reader not set.")
return await self.reader.readexactly(size)

async def readuntil(self, separator: bytes):
async def readuntil(self, separator: bytes = b'\n'):
"""Read until separator"""
if not self.reader:
raise MissingReaderException("reader not set.")
Expand Down

0 comments on commit ba3d43d

Please sign in to comment.