Skip to content

Commit

Permalink
Merge pull request #23 from DataDog/olivielpeau/close-socket
Browse files Browse the repository at this point in the history
Allow closing the UDP socket
  • Loading branch information
yannmh committed Jan 8, 2016
2 parents ea3bbff + f354703 commit 543c99e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/statsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,9 @@ def send_to_socket(message)
self.class.logger.error { "Statsd: #{boom.class} #{boom}" } if self.class.logger
nil
end

# Close the underlying socket
def close()
@socket.close
end
end

0 comments on commit 543c99e

Please sign in to comment.