From 50b188e3c8d7f5fd8916392e62a212c23f2bd224 Mon Sep 17 00:00:00 2001 From: Christian Rapp <37624960+RappC@users.noreply.github.com> Date: Tue, 4 Feb 2020 18:48:34 +0100 Subject: [PATCH] PING command not working With the current version of clamav we were only able to get the ping-command working with the fix provided. You might want to double-check. --- src/main/java/fi/solita/clamav/ClamAVClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fi/solita/clamav/ClamAVClient.java b/src/main/java/fi/solita/clamav/ClamAVClient.java index 7f14e11..c24ed45 100644 --- a/src/main/java/fi/solita/clamav/ClamAVClient.java +++ b/src/main/java/fi/solita/clamav/ClamAVClient.java @@ -52,7 +52,7 @@ public ClamAVClient(String hostName, int port) { public boolean ping() throws IOException { try (Socket s = new Socket(hostName,port); OutputStream outs = s.getOutputStream()) { s.setSoTimeout(timeout); - outs.write(asBytes("zPING\0")); + outs.write(asBytes("PING")); outs.flush(); byte[] b = new byte[PONG_REPLY_LEN]; InputStream inputStream = s.getInputStream();