From f3547037e399f706c65b7ded93f80a788475d5b2 Mon Sep 17 00:00:00 2001 From: Olivier Vielpeau Date: Thu, 29 Oct 2015 13:26:35 -0400 Subject: [PATCH] Allow closing the underlying UDP socket --- lib/statsd.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/statsd.rb b/lib/statsd.rb index cc0ee91b..eff7f4ad 100644 --- a/lib/statsd.rb +++ b/lib/statsd.rb @@ -376,4 +376,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