Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clamav_client/clamd.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def instream(self, buff: BinaryIO) -> ScanResults:
chunk = buff.read(max_chunk_size)
while chunk:
size = struct.pack(b"!L", len(chunk))
self.clamd_socket.send(size + chunk)
self.clamd_socket.sendall(size + chunk)
chunk = buff.read(max_chunk_size)
self.clamd_socket.send(struct.pack(b"!L", 0))
self.clamd_socket.sendall(struct.pack(b"!L", 0))
result = self._recv_response()
if len(result) > 0:
if result == "INSTREAM size limit exceeded. ERROR":
Expand Down Expand Up @@ -217,7 +217,7 @@ def _send_command(self, cmd: str, *args: str) -> None:
if args:
concat_args = " " + " ".join(args)
send = f"n{cmd}{concat_args}\n".encode()
self.clamd_socket.send(send)
self.clamd_socket.sendall(send)

def _recv_response(self) -> str:
"""
Expand Down
Loading