From 9f8c98ce1bd28fc29bbc21d5862d2c0443413ce2 Mon Sep 17 00:00:00 2001 From: hagaigubber Date: Thu, 16 Dec 2021 17:38:08 +0200 Subject: [PATCH 1/2] fix status bug --- lib/nutcracker/web/app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nutcracker/web/app.rb b/lib/nutcracker/web/app.rb index 773a9db..ab7e524 100644 --- a/lib/nutcracker/web/app.rb +++ b/lib/nutcracker/web/app.rb @@ -36,7 +36,7 @@ def initialize(nutcracker, external_servers = []) map { |x| x["servers"] + [x["listen"]] }. flatten. map { |x| x.split(":") }. - map { |host, port| Thread.new { { host: host, port: port, ok: (TCPSocket.new(host,port).close rescue false) } } }. + map { |host, port| Thread.new { { host: host, port: port, ok: (TCPSocket.new(host,port).close.nil? rescue false) } } }. map(&:value). flatten. reject { |node_health| node_health[:ok]}. #cleare all healthy nodes from the nodes array From bc721b6b262f0c47e8e11b7f84ec7cf58c13d0d4 Mon Sep 17 00:00:00 2001 From: hagaigubber Date: Sun, 19 Dec 2021 10:44:52 +0200 Subject: [PATCH 2/2] Bump nutcracker-web to 0.0.20 --- lib/nutcracker/web/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nutcracker/web/version.rb b/lib/nutcracker/web/version.rb index 4459768..588317b 100644 --- a/lib/nutcracker/web/version.rb +++ b/lib/nutcracker/web/version.rb @@ -1,5 +1,5 @@ module Nutcracker module Web - VERSION="0.0.19" + VERSION="0.0.20" end end