Skip to content

Commit

Permalink
[GH-7] Throw a server connect error more clearly (#11)
Browse files Browse the repository at this point in the history
* Check ping for ClamAV server

* Remove ClamAV server round trip. Throw custom error message in Scantream function.
  • Loading branch information
anidok authored and cpoile committed Dec 18, 2019
1 parent cdde54e commit 48a48a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (p *Plugin) FileWillBeUploaded(c *plugin.Context, info *model.FileInfo, fil
response, err := av.ScanStream(file, abortScan)
if err != nil {
p.API.LogError("Error while scanning for viruses. " + err.Error())
return nil, "Error while scanning for viruses."
return nil, "File Scanning Server unreachable, contact your Mattermost administrator for assistance."
}
for {
select {
Expand Down

0 comments on commit 48a48a5

Please sign in to comment.