diff --git a/lib/rex/io/stream.rb b/lib/rex/io/stream.rb index e3458e5aa2..71007f6c2c 100644 --- a/lib/rex/io/stream.rb +++ b/lib/rex/io/stream.rb @@ -73,22 +73,12 @@ module Stream # def has_read_data?(timeout = nil) begin - if RUBY_VERSION =~ /^1\.9\./ and RUBY_PLATFORM !~ /cygwin|mingw32/ - if ((rv = ::IO.select([ fd ], nil, nil, timeout)) and - (rv[0]) and - (rv[0][0] == fd)) - true - else - false - end + if ((rv = ::IO.select([ fd ], nil, nil, timeout)) and + (rv[0]) and + (rv[0][0] == fd)) + true else - if ((rv = Rex::ThreadSafe.select([ fd ], nil, nil, timeout)) and - (rv[0]) and - (rv[0][0] == fd)) - true - else - false - end + false end rescue StreamClosedError, ::IOError, ::EOFError, ::Errno::EPIPE # If the thing that lead to the closure was an abortive close, then