From a20b74c7428d38ae714f537b2e90d3f43e23eedc Mon Sep 17 00:00:00 2001
From: wungad <sir.mandic@gmail.com>
Date: Wed, 22 Nov 2017 16:49:11 +0100
Subject: [PATCH] replaced gethostbyname with getaddrinfo

---
 python.d/dns_query_time.chart.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python.d/dns_query_time.chart.py b/python.d/dns_query_time.chart.py
index aa115d8321..9a794a9c94 100644
--- a/python.d/dns_query_time.chart.py
+++ b/python.d/dns_query_time.chart.py
@@ -4,7 +4,7 @@
 
 from random import choice
 from threading import Thread
-from socket import gethostbyname, gaierror
+from socket import getaddrinfo, gaierror
 
 try:
     from time import monotonic as time
@@ -109,7 +109,7 @@ def dns_request(server_list, timeout, domains):
 
 def check_ns(ns):
     try:
-        return gethostbyname(ns)
+        return getaddrinfo(ns, 'domain')[0][4][0]
     except gaierror:
         return False