]> Sergey Matveev's repositories - public-inbox.git/commit
daemon: fixup usage of the '-l' switch with IP/INET6 sockets
authorEric Wong <e@80x24.org>
Fri, 11 Mar 2016 21:59:42 +0000 (21:59 +0000)
committerEric Wong <e@80x24.org>
Fri, 11 Mar 2016 22:03:21 +0000 (22:03 +0000)
commitd5fce291ff67459ccf2939afea0ea6a1157869d8
tree242dda59e01aa46e0814ac6750df4239d2a618ea
parentea1b6cbd422b7e392cdb6979837a42679b0f180f
daemon: fixup usage of the '-l' switch with IP/INET6 sockets

We need to ensure $sock_pkg is preserved outside of the loop.
The variable passed to "for" or "foreach" is implicitly local
and restores the previous value when the loop exits.  This is
documented in the perlsyn manpage in the "Foreach Loops"
section.

Fixes: ea1b6cbd422b ("daemon: allow using IO::Socket::IP over INET6")
lib/PublicInbox/Daemon.pm