Skip Menu |

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

Report information
The Basics
Id: 92694
Status: resolved
Priority: 0/
Queue: Net-WebSocket-Server

People
Owner: TOPAZ [...] cpan.org
Requestors: david [...] empireofgames.com
Cc:
AdminCc:

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



Subject: Bug in Server.pm handling of socket in use
Date: Mon, 3 Feb 2014 14:06:08 -0500
To: bug-Net-WebSocket-Server [...] rt.cpan.org
From: "David E." <david [...] empireofgames.com>
The croak expression on line 54 of Server.pm fails due to an uninitialized value when the port is already in use. This is due to the statement already assigning a (undefined) value to the listen attribute which is serving double-duty. One way to correct the bug is to change "$self->{listen} = IO::Socket::INET->new(" to "my $listen = IO::Socket::INET->new(" and then set "$self->{listen}=$listen;" on the following line. - David
On Mon Feb 03 14:06:38 2014, david@empireofgames.com wrote: Show quoted text
> The croak expression on line 54 of Server.pm fails due to an uninitialized > value when the port is already in use. This is due to the statement > already assigning a (undefined) value to the listen attribute which is > serving double-duty. > > One way to correct the bug is to change "$self->{listen} = > IO::Socket::INET->new(" to "my $listen = IO::Socket::INET->new(" and then > set "$self->{listen}=$listen;" on the following line. > > - David
Good catch. Fixed in 0.002003 which CPAN should pick up shortly.