File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,32 +94,34 @@ public AntivirusScanner()
9494 public void start ()
9595 {
9696 long period = periodSeconds (schedule );
97- CommonRails .printSystemComponent (this , this .hashCode (),
98- ". AntivirusScanner starting — schedule=" + schedule
99- + " (" + period + "s) path=" + scanPath + " ." );
97+ CommonRails .printSystemComponent (this , this .hashCode (), ". AntivirusScanner starting — schedule=" + schedule + " (" + period + "s) path=" + scanPath + " ." );
10098
10199 Executors .newSingleThreadScheduledExecutor (r ->
102100 {
103101 Thread t = new Thread (r , "AntivirusScanner" );
102+
104103 t .setDaemon (true );
104+
105105 return t ;
106+
106107 }).scheduleAtFixedRate (this ::scan , 0 , period , TimeUnit .SECONDS );
107108 }
108109
109110 private void scan ()
110111 {
111- CommonRails .printSystemComponent (this , this .hashCode (),
112- ". AntivirusScanner >> starting scan of " + scanPath + " ." );
112+ CommonRails .printSystemComponent (this , this .hashCode (), ". AntivirusScanner >> starting scan of " + scanPath + " ." );
113+
113114 runClamScan ();
115+
114116 runIntegrityCheck ();
115117 }
116118
117119 private void runClamScan ()
118120 {
119121 if (!clamAvailable ())
120122 {
121- CommonRails .printSystemComponent (this , this .hashCode (),
122- ". AntivirusScanner >> clamscan not found on PATH — skipping AV scan ." );
123+ CommonRails .printSystemComponent (this , this .hashCode (), ". AntivirusScanner >> clamscan not found on PATH — skipping AV scan ." );
124+
123125 return ;
124126 }
125127 try
You can’t perform that action at this time.
0 commit comments