Subject: | Net::SIP::Leg does not specify ReuseAddr with IO::Socket::IP |
Date: | Fri, 27 Jan 2017 17:10:08 +0000 |
To: | "bug-Net-SIP [...] rt.cpan.org" <bug-Net-SIP [...] rt.cpan.org> |
From: | Richard Carver <richard.carver [...] cloudmont.co.uk> |
Net::SIP::Leg new sets 'Reuse => 1' in the socket arguments, but IO::Socket::IP uses a different parameter name for this, 'ReuseAddr => 1'.
I suggest specifying both Reuse and ReuseAddr for compatibility with both socket modules. i.e.:
my %sockargs = (
Proto => $proto eq 'tls' ? 'tcp' : $proto,
Family => $src->{family},
LocalAddr => $src->{addr},
Reuse => 1,
ReuseAddr => 1,
);