in reply to Double Click of Death on Perl Web Server
Can't close(IO::Socket::INET=GLOB(0x7fbc9ab6e300)) filehandle: 'Broken pipe'I tried a few things that didn't help (like $SIG{PIPE} = 'IGNORE') but this eval on close does the trick:
while (my $client = $server->accept) {
...
}
eval { close $client } # autodie in use
The Perl Cookbook says to use "shutdown" (0,1,2) instead of "close" but I get this:
Can't shutdown('IO::Socket::INET=GLOB(0x7fd3857a5e40)', '0'): Socket is not connected
What is the correct way to handle this condition (besides eval hack)?
Thanks again
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Double Click of Death on Perl Web Server
by syphilis (Archbishop) on Sep 30, 2018 at 14:04 UTC | |
by Anonymous Monk on Sep 30, 2018 at 16:20 UTC | |
by ikegami (Patriarch) on Oct 02, 2018 at 03:18 UTC | |
by Anonymous Monk on Oct 02, 2018 at 21:04 UTC | |
by ikegami (Patriarch) on Oct 03, 2018 at 19:52 UTC | |
|
Re^2: Double Click of Death on Perl Web Server
by tybalt89 (Monsignor) on Sep 30, 2018 at 14:26 UTC | |
|
Re^2: Double Click of Death on Perl Web Server
by haj (Vicar) on Sep 30, 2018 at 13:59 UTC | |
by Anonymous Monk on Sep 30, 2018 at 16:07 UTC | |
by Anonymous Monk on Oct 03, 2018 at 19:23 UTC |