Skip Menu |

This queue is for tickets about the POE-Component-Client-Ping CPAN distribution.

Report information
The Basics
Id: 35738
Status: resolved
Priority: 0/
Queue: POE-Component-Client-Ping

People
Owner: Nobody in particular
Requestors: isaacson [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.13
Fixed in: (no value)



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.
On Fri May 09 00:18:47 2008, ISAACSON wrote: Show quoted text
> 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.
Sorry for the woefully slow response. Yes, I'm interested in this patch if you still have it. Thank you.
A Test::More-based regression test case would also be fabulous.
I've committed a fix as revision 57, and it will be uploaded to PAUSE shortly. Thank you for the detailed report; it helped me reproduce and fix the problem.