From 35c306d0a606a360ede47e77d76cec5ccddcc37b Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Tue, 22 Aug 2023 16:03:25 -0300 Subject: [PATCH] FIX: Use hostname and port passed to the proc. There are no instance variables (#45) --- lib/discourse_antivirus/clamav_services_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_antivirus/clamav_services_pool.rb b/lib/discourse_antivirus/clamav_services_pool.rb index f4cd0a1..0246b6d 100644 --- a/lib/discourse_antivirus/clamav_services_pool.rb +++ b/lib/discourse_antivirus/clamav_services_pool.rb @@ -20,7 +20,7 @@ def connection_factory @factory ||= Proc.new do |hostname, port| begin - TCPSocket.new(@hostname, @port, connect_timeout: 3) + TCPSocket.new(hostname, port, connect_timeout: 3) rescue StandardError nil end