Skip to content

Commit

Permalink
FIX: Add a 3 second timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nbianca committed Aug 2, 2023
1 parent df594da commit 7d0e66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/discourse_antivirus/clamav_services_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def build_socket(target)
return if target.port.blank?

begin
TCPSocket.new(target.hostname, target.port)
TCPSocket(target.hostname, target.port, connect_timeout: 3)
rescue StandardError
nil
end
Expand Down

0 comments on commit 7d0e66d

Please sign in to comment.