summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFedor Kovalev <kovalevfm@gmail.com>2014-09-03 09:36:11 (GMT)
committerFedor Kovalev <kovalevfm@gmail.com>2014-09-03 09:36:11 (GMT)
commit9097b0d7ba6ac0926728a48049b4dcd7ba7c87e0 (patch)
tree7458e8f218c41325c46c6f39805c8ce7662e04f4
parent3a8683e89d32bcb1b28968e58c0274e5f6805f4f (diff)
downloadgstatsd-9097b0d7ba6ac0926728a48049b4dcd7ba7c87e0.zip
gstatsd-9097b0d7ba6ac0926728a48049b4dcd7ba7c87e0.tar.gz
gstatsd-9097b0d7ba6ac0926728a48049b4dcd7ba7c87e0.tar.bz2
add ipv6 support
-rw-r--r--gstatsd/sink.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gstatsd/sink.py b/gstatsd/sink.py
index 8d51a32..cf32927 100644
--- a/gstatsd/sink.py
+++ b/gstatsd/sink.py
@@ -100,8 +100,7 @@ class GraphiteSink(Sink):
for host in self._hosts:
# flush stats to graphite
try:
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.connect(host)
+ sock = socket.create_connection(host)
sock.sendall(buf.getvalue())
sock.close()
except Exception, ex: