avoid warning in IO::Select::exists() if socket doesn't exist
Gurusamy Sarathy [Fri, 3 Dec 1999 06:15:54 +0000 (06:15 +0000)]
p4raw-id: //depot/perl@4628

ext/IO/lib/IO/Select.pm

index f021a79..7917102 100644 (file)
@@ -46,7 +46,9 @@ sub remove
 sub exists
 {
  my $vec = shift;
- $vec->[$vec->_fileno(shift) + FIRST_FD];
+ my $fno = $vec->_fileno(shift);
+ return undef unless defined $fno;
+ $vec->[$fno + FIRST_FD];
 }