I think this is wrong:
while (<$sock>) {
Looking at perldoc IO::Socket, you need one or two things:
TCP has a teardown sequence: the sender closes its port; the receiver acknowledges the close and closes its own. . It's very unlikely that rebooting the PBX interferes with that. Your TCP stack knows the sender is gone, but because you're not timing out, you never learn of it.
In reply to Re: Telnet session disconnect testing
by jklowden
in thread Telnet session disconnect testing
by bajangerry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |