lib/recognizer/tcp.rb in recognizer-0.1.2 vs lib/recognizer/tcp.rb in recognizer-0.1.3

- old
+ new

@@ -13,11 +13,11 @@ options[:tcp] ||= Hash.new threads = options[:tcp][:threads] || 20 port = options[:tcp][:port] || 2003 - tcp_server = TCPServer.new("0.0.0.0", port) + tcp_server = TCPServer.new("0.0.0.0", port) tcp_connections = Queue.new Thread.abort_on_exception = true threads.times do @@ -33,9 +33,10 @@ if line.split("\s").count == 3 carbon_queue.push(line) end end rescue Timeout::Error + logger.warn("TCP -- A connection has timed out") connection.close end end end end