in reply to Re^3: Net::SSH::Perl hangs(during cmd), but only in Mason environment
in thread Net::SSH::Perl hangs(during cmd), but only in Mason environment

I have this same issue, and took a closer look at the select() code.

Note that $t is a timeout value that can be provided on the select call.

By adding a timeout value to the select() call in SSH2.pm, you can avoid this.

In SSH2.pm change this line:

my($rready, $wready) = $select_class->select($rb, $wb);

To have a timeout value (1 second), like this:

my($rready, $wready) = $select_class->select($rb, $wb, undef, 1);