posix4e/GraphiteMetrics2 — pull request #2 by abhishekjain88 (2014-06-16 15:07:09+00:00)
Title: Socket connection retry logic

The change takes care of the following :

Earlier:
When the socket gets disconnected due to any network glitch or any of the 2 services (graphite or the service sending metrics) going down temporarily, it never used to try connecting again unless the service sending the metrics was restarted. This could be really expensive as due to a small network glitch, the service needed to be restarted.

Fix:

Two new configurable parameters introduced (README.md) changed to configure the interval at which the socket connection needs to be retried and the number of times it needs to be retried.

The socket connection is retried in case of a write failure/SocketConnectException.

Please review the changes and let me know in case of any suggestions/comments.