Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nbianca committed Aug 2, 2023
1 parent 7d0e66d commit 2020e84
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/discourse_antivirus/clamav.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ def scan_file(file)
socket = sockets.shuffle.find { |s| target_online?(s) }
sockets.each { |s| s&.close if socket != s }

scan_response = begin
with_session(socket) { |s| stream_file(s, file) }
rescue StandardError => e
e.message
end
scan_response =
begin
with_session(socket) { |s| stream_file(s, file) }
rescue StandardError => e
e.message
end

parse_response(scan_response)
end
Expand Down

0 comments on commit 2020e84

Please sign in to comment.