Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 37282
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: kvs [...] binarysolutions.dk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.63
Fixed in: (no value)



Subject: Net::DNS::Nameserver doesn't handle client disconnect in loop_once()
If a client disconnects while Net::DNS::Nameserver is sending data, syswrite returns 'undef', spewing a lot of warnings to STDOUT in the following: my $charssent = $sock->syswrite($self->{"_tcp"}{$s}{"outbuffer"}); print "Sent $charssent of $len octets to ",$self->{"_tcp"}{$s}{"peer"},".\n" if $self->{"Verbose"}; I'm guessing it's enough to just throw a conditional around the lines that use $charssent, since the connection gets removed correctly once readfromtcp() is called? /Kenneth
Subject: Net::DNS::Nameserver doesn't handle client disconnect in loop_once()
If a client disconnects while Net::DNS::Nameserver is sending data, syswrite returns 'undef', spewing a lot of warnings to STDOUT in the following: my $charssent = $sock->syswrite($self->{"_tcp"}{$s}{"outbuffer"}); print "Sent $charssent of $len octets to ",$self->{"_tcp"}{$s}{"peer"},".\n" if $self->{"Verbose"}; I'm guessing it's enough to just throw a conditional around the lines that use $charssent, since the connection gets removed correctly once readfromtcp() is called? /Kenneth
From: rwfranks [...] acm.org
my $charssent = $sock->syswrite($self->{"_tcp"}{$s}{"outbuffer"}) || 0; would be better for debugging because the failed write gets reported.
Dick's suggestion has been applied. Lives on the trunk as of revision 735