in reply to IO::Socket persisting on Linux despite being closed (updated)
Linux keeps the socket in use while it is in the TIME_WAIT state. The SO_REUSEADDR option may help.
I haven't tried but does the following work?
$socket->setsockopt( SOL_SOCKET, SO_REUSEADDR, 1 );
Update: IO::Socket::INET references SO_REUSEADDR and SO_REUSEPORT. You may need to try each.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IO::Socket persisting on Linux despite being closed
by Anonymous Monk on Oct 25, 2018 at 20:16 UTC |