Permalink
Browse files

actually notice timeout during AXFR retrieve, thanks hkraal

  • Loading branch information...
1 parent b383b04 commit 016a0abb8d400468b0bae46b8e567dc4a9f89700 @Habbie Habbie committed Jul 23, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 pdns/resolver.cc
View
@@ -460,8 +460,11 @@ void AXFRRetriever::timeoutReadn(uint16_t bytes)
int n=0;
int numread;
while(n<bytes) {
- if(waitForData(d_sock, 10-(time(0)-start))<0)
+ int res=waitForData(d_sock, 10-(time(0)-start));
+ if(res<0)
throw ResolverException("Reading data from remote nameserver over TCP: "+stringerror());
+ if(!res)
+ throw ResolverException("Timeout while reading data from remote nameserver over TCP");
numread=recv(d_sock, d_buf.get()+n, bytes-n, 0);
if(numread<0)

0 comments on commit 016a0ab

Please sign in to comment.