stvp/lua-statsd-client — pull request #1 by ajacksified (2013-05-07 05:44:07+00:00)
Title: use persistent udp connection

Hi there,

lua socket helpfully closes udp connections when an object is garbage collected. This pull request keeps the udp connection open instead of re-opening every request, which makes it super useful for web applications that deal with lots of requests!

Made the tests a wee bit hacky, due to a shortfall in luassert, which we should fix (it was throwing errors on `was.called_with(statsd, string)`, so I overrode `send_to_socket` locally. Yikes!)