Skip to content
Browse files

close connection after writing

  • Loading branch information...
1 parent 9d694b5 commit d26a2ac1e366bf045e09805aa9da4791d01f6d1c @dj2 dj2 committed Oct 20, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/gmetric.rb
View
2 lib/gmetric.rb
@@ -22,12 +22,14 @@ def self.send(host, port, metric)
conn.send_datagram gmetric[0], host, port
conn.send_datagram gmetric[1], host, port
+ conn.close_connection_after_writing
else
conn = UDPSocket.new
conn.connect(host, port)
conn.send gmetric[0], 0
conn.send gmetric[1], 0
+ conn.close
end
end

0 comments on commit d26a2ac

Please sign in to comment.
Something went wrong with that request. Please try again.