Subject: | IO::Socket::IP returns wrong (true) value on failures when Blocking is 0 |
On failures, instead of false, it returns the created socket only when blocking option is passed to the constructor with value 0
The test case is attached
Subject: | socket.t |
use IO::Socket::IP;
use IO::Socket::INET;
use strict;
use warnings;
use Test::More;
my %opts = (
LocalPort => 80,
LocalHost => "2.2.2.2",
Blocking => 0,
Listen => 5,
Proto => 'tcp',
Type => SOCK_STREAM
);
# IO::Socket::IP returns true value on failure when the Blocking is false
ok(!IO::Socket::IP->new(%opts));
ok(!IO::Socket::INET->new(%opts));
done_testing;