Don't constantly loop around when there is an error connecting to Graphite and also ensure the TCP connection is closed.