Skip to content

Commit e5425af

Browse files
committed
fix(lsp): use readexactly to ensure all bytes are read (#21)
1 parent a9787dd commit e5425af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clangd_tidy/lsp/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ async def recv(self) -> Dict[str, Any]:
6969
break
7070
if header.content_length is None:
7171
raise ValueError("Missing Content-Length header field")
72-
content = await self._in_stream.read(header.content_length)
72+
content = await self._in_stream.readexactly(header.content_length)
7373
return json.loads(content.decode())

0 commit comments

Comments
 (0)