Skip to content

Commit

Permalink
Merge pull request #20 from kontera-technologies/fixing_status_bug
Browse files Browse the repository at this point in the history
fix status bug
  • Loading branch information
hagaigubber authored Dec 19, 2021
2 parents 7eabb12 + bc721b6 commit f270648
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/nutcracker/web/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/nutcracker/web/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Nutcracker
module Web
VERSION="0.0.19"
VERSION="0.0.20"
end
end

0 comments on commit f270648

Please sign in to comment.