Subject: | Use of Socket prevents session from ever ending |
PoCoCl::Ping doesn't support Net::Ping's bind() or $device behavior,
which allows the user to control the source address and/or interface
used for sending pings. So I tried building the socket myself (lifting
some code from create_handle) and passing it in with Socket. But that
caused the pinger session to live forever. POE_TRACE_EVENTS showed a
constant stream of events hitting the pinger session and keeping the
kernel from shutting down.
If I step through in the debugger and manually set $heap->
{keep_socket} = 0, it shuts down properly after handling all ping
requests. I understand the reason for keep_socket though -- you don't
want to lose the reference to the user-supplied socket, in case more
ping requests come in later. Perhaps the problem is really with
spurious events being generated on the socket I created? Any idea
where those might be coming from?
Anyway, this is both a problem report and a feature request: in
addition to making Socket work, it would be nice to get the Bind and
Device options supported. I'd be glad to supply a patch for those if
you're interested.