Skip to content

Commit

Permalink
Fix ruby hash_client get to return nil when key not found
Browse files Browse the repository at this point in the history
  • Loading branch information
alevy committed Mar 18, 2009
1 parent cd95fbe commit c63d827
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ruby/donut/hash_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def get(key)
if not @socket.open?
@socket.open
end
return @client.get(key)
begin
return @client.get(key)
rescue
return nil
end
end

def put(key, data)
Expand Down

0 comments on commit c63d827

Please sign in to comment.