in reply to Re: Socket hang. (Windows or Perl? Solutions?) (Updated)
in thread Socket hang. (Windows or Perl? Solutions?) (Updated)
I replaced the deprecated Reuse with ReuseAddr, and I added Blocking => 0, to the IO::Socket::INET constructors.
You don't say what affect that had?
Replacing Reuse with ReuseAddr shouldn't make any difference, as they are the same thing. Only the keyname changed.
Setting blocking off might have some affect (on *nix), but is (or was: it might have changed in recent versions) a no-op on Windows. But in any case, the change would break the code as it is designed to use blocking reads and writes.
FYI, on my Fedora system, there's a stack_size minimum of 16384.
That appears to be a bug in the *nix implementation. The docs suggest that if you attempt to set it too low, it will be rounded up to the minimum: Some platforms have a minimum thread stack size. Trying to set the stack size below this value will result in a warning, and the minimum stack size will be used.
I've removed it from the OP code.
|
|---|