sivy/py-statsd — pull request #37 by TimBaldoni (2011-11-14 21:04:53+00:00)
Title: Graphite socket exception handling

Without exception handling, pystatsd can hang forever.

If it can't connect to carbon the following traceback is seen and then nothing happens:

```python
Exception in thread Thread-17:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 736, in run
self.function(*self.args, **self.kwargs)
File "/usr/lib/pymodules/python2.6/pystatsd/server.py", line 177, in flush
graphite.connect((self.graphite_host, self.graphite_port))
File "", line 1, in connect
error: [Errno 111] Connection refused
```