Permalink
Browse files

Cleanup of write_packet method.

  • Loading branch information...
1 parent 77df9b6 commit aaa01f97347eb15fa9721ebdba99edfd907fc22e @wvanbergen wvanbergen committed Feb 10, 2014
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/statsd/instrument.rb
View
@@ -217,14 +217,12 @@ def collect(type, k, v, options = {})
def write_packet(command)
if mode.to_s == 'production'
- begin
- socket.send(command, 0)
- rescue SocketError, IOError, SystemCallError => e
- logger.error e
- end
+ socket.send(command, 0)
else
logger.info "[StatsD] #{command}"
end
+ rescue SocketError, IOError, SystemCallError => e
+ logger.error e
end
def clean_tags(tags)

0 comments on commit aaa01f9

Please sign in to comment.