From fbf18d759ff9a1cc6c66a1edc1cfc47bec480d78 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 29 Nov 2015 20:22:34 +0100 Subject: [PATCH] make sdig wait only 10 seconds, which _might_ give more helpful debugging output in travis. At least earlier :-) --- pdns/sdig.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.47.2