graylog-labs / gelf-rb

Ruby GELF library (Graylog Extended Log Format)
https://rubygems.org/gems/gelf
MIT License
153 stars 104 forks source link

Close UDPSocket when closing logger #33

Closed markglenn closed 9 years ago

markglenn commented 9 years ago

When creating a new logger or notifier, a UDPSocket is created which opens a file descriptor. This is not cleaned up when the logger is closed. If a notifier is created per request in Rails, it can cause a "Too many open files" error to occur.

This pull request makes the logger.close method close the UDP socket.

There's also a minor bump in the JSON gem version to make it compatible with Ruby 2.2.x. https://github.com/flori/json/issues/229

joschi commented 9 years ago

Thanks for contributing to this project! To continue merging this PR, we need you to sign our Individual Contributor Assignment Agreement as described in https://www.graylog.org/contributing-to-graylog/

markglenn commented 9 years ago

I signed it earlier today and sent it to you. Let me know if you didn't receive it

joschi commented 9 years ago

We've got the CLA on record. Thanks!