Skip to content

Commit

Permalink
decouple default port number from memcache library
Browse files Browse the repository at this point in the history
  • Loading branch information
glaszig committed May 27, 2022
1 parent 17ae25d commit 9691c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/amnesia/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ module Amnesia
class Host
FLOAT_STATS = %w[ rusage_user rusage_system ]
STRING_STATS = %w[ version libevent ]
DEFAULT_PORT = 11_211

def self.normalize_address address
return "#{address}:#{Dalli::Server::DEFAULT_PORT}" unless address.include? ":"
return "#{address}:#{DEFAULT_PORT}" unless address.include? ":"

address
end
Expand Down

0 comments on commit 9691c98

Please sign in to comment.