From: bert hubert Date: Sun, 29 Nov 2015 19:22:34 +0000 (+0100) Subject: make sdig wait only 10 seconds, which _might_ give more helpful debugging output... X-Git-Tag: dnsdist-1.0.0-alpha1~170^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbf18d759ff9a1cc6c66a1edc1cfc47bec480d78;p=thirdparty%2Fpdns.git make sdig wait only 10 seconds, which _might_ give more helpful debugging output in travis. At least earlier :-) --- diff --git a/pdns/sdig.cc b/pdns/sdig.cc index 19227a41a4..fec4290b9f 100644 --- a/pdns/sdig.cc +++ b/pdns/sdig.cc @@ -108,7 +108,11 @@ try { Socket sock(dest.sin4.sin_family, SOCK_DGRAM); sock.sendTo(string((char*)&*packet.begin(), (char*)&*packet.end()), dest); - + int result=waitForData(sock.getHandle(), 10); + if(result < 0) + throw std::runtime_error("Error waiting for data: "+string(strerror(errno))); + if(!result) + throw std::runtime_error("Timeout waiting for data"); sock.recvFrom(reply, dest); } MOADNSParser mdp(reply);