Skip to content
Snippets Groups Projects
Commit a335766b authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- Keepalive enabled

- ReUseAddress enabled
- more detailed error log
parent 7dee39ba
Branches
Tags
No related merge requests found
......@@ -49,7 +49,7 @@
</fr:x_form>
</pl:initParameters>
<pl:description>SLUB Virus Check Plugin using installed ClamAV daemon via tcp-sockets</pl:description>
<pl:version>1.5</pl:version>
<pl:version>1.6</pl:version>
<pl:materialType>DIGITAL</pl:materialType>
<pl:module>Repository</pl:module>
<pl:generalType>TASK</pl:generalType>
......
......@@ -186,6 +186,16 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
//System.out.println("Could not set socket timeout to " + getTimeOut() + "ms " + e);
log.error( "Could not set socket timeout to " + getTimeOut() + "ms", e);
}
try {
socket.setKeepAlive(true);
} catch (SocketException e) {
log.error( "Could not enable KeepAlive", e);
}
try {
socket.setReuseAddress( true );
} catch (SocketException e) {
log.error( "Could not set ReUseAddress", e);
}
return socket;
}
......@@ -286,7 +296,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
//System.out.println("clamd protocol not fully implemented");
}
} catch (IOException e) {
log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e);
log.error("exception creation socket in scan(), clamd not available at host=" + host + "port=" + port, e);
//System.out.println("exception creation socket, clamd not available at host=" + host + "port=" + port + " " + e);
setStatus(Status.FAILED);
setSignature("ERROR: clamd not available");
......@@ -314,7 +324,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
callSocketCommand(socket, command);
return response.trim();
} catch (IOException e) {
log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e);
log.error("exception creation socket in getAgent(), clamd not available at host=" + host + "port=" + port, e);
//System.out.println("exception creation socket, clamd not available at host=" + host + "port=" + port + " " + e);
setStatus(Status.FAILED);
setSignature("ERROR: clamd not available");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment