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