[rt.cpan.org #61577] sockdomain and socktype undef on newly accepted sockets
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 17 Feb 2012 22:29:14 +0000 (14:29 -0800)
committerRicardo Signes <rjbs@cpan.org>
Thu, 10 May 2012 13:53:14 +0000 (09:53 -0400)
commit271d04eee1933df0971f54f7bf9a5ca3575e7e6a
tree75270f1a3be0ff4d47e8ec9aa6fbaa8fae48a54d
parentbe109f01e91266a4cf170323c0a8f0d915bae205
[rt.cpan.org #61577] sockdomain and socktype undef on newly accepted sockets

There appears to be a flaw in IO::Socket where some IO::Socket objects
are unable to properly report their socktype, sockdomain, or protocol
(they return undef, even when the underlying socket is sufficiently
initialized to have these properties).

The attached patch should cover IO::Socket objects created via accept(),
new_from_fd(), new(), and anywhere else whose details haven't been
properly cached.

No new code should be executed on IO::Socket objects whose details are
already cached and present.
AUTHORS
MANIFEST
META.yml
dist/IO/lib/IO/Socket.pm
dist/IO/t/cachepropagate-tcp.t [new file with mode: 0644]
dist/IO/t/cachepropagate-udp.t [new file with mode: 0644]
dist/IO/t/cachepropagate-unix.t [new file with mode: 0644]