Skip Menu |

This queue is for tickets about the POE-Component-Server-SimpleHTTP CPAN distribution.

Report information
The Basics
Id: 29794
Status: new
Priority: 0/
Queue: POE-Component-Server-SimpleHTTP

People
Owner: Nobody in particular
Requestors: bra [...] fsn.hu
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.23
Fixed in: (no value)



Subject: Re-binding, when it's not necessary (accept error: 53 on FreeBSD)
In SimpleHTTP's SetupListener the SocketFactory is created with an error handler (FailureEvent) of ListenerError. ListenerError unconditionally calls SetupListener if it gets executed, but this is wrong. In my case, the execution gets to ListenerError with an error of (DEBUG output): "SocketFactory Wheel 1 generated accept error 53: Software caused connection abort" which means (AFAIK) that the other side has closed the connection, before POE could accept() it, so this is not an error. But because of calling SetupListener (which will call ListenerError again, because it can't bind to the already used port, which in turn call it again) the program will eventually die, when the maxtry entry has reached. I guess in ListenerError this case should be handled (maybe a call to $_[HEAP]->{'SOCKETFACTORY'}->getsockname to see whether the socket is there and if it is, don't try to set it up again). Thanks
From: bra [...] fsn.hu
On P 2007. okt. 05 09:42:28, bra wrote: Show quoted text
> In SimpleHTTP's SetupListener the SocketFactory is created with an error > handler (FailureEvent) of ListenerError. > > ListenerError unconditionally calls SetupListener if it gets executed, > but this is wrong. > > In my case, the execution gets to ListenerError with an error of (DEBUG > output): > "SocketFactory Wheel 1 generated accept error 53: Software caused > connection abort" > > which means (AFAIK) that the other side has closed the connection, > before POE could accept() it, so this is not an error. > > But because of calling SetupListener (which will call ListenerError > again, because it can't bind to the already used port, which in turn > call it again) the program will eventually die, when the maxtry entry > has reached. > > I guess in ListenerError this case should be handled (maybe a call to > $_[HEAP]->{'SOCKETFACTORY'}->getsockname to see whether the socket is > there and if it is, don't try to set it up again). > > Thanks
Oh, I forgot to tell that it's error code 53 (ECONNABORTED) on FreeBSD, but of course this differs on other platforms, so the code should not be used directly to check for this error