I am using the 'rsolr' library on ruby-1.9.3 (Windows 7 64 bits) to
access the BITNAMI/Apache/Solr stack running on my desktop. When adding
records to the index, I sometimes get the exception below (but the
addition is correct, and my code works OK) :

Exception `Errno::EWOULDBLOCK' at
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 ... read would block

The culprit is :

    def rbuf_fill # net/protocol.rb, line 139
      begin
        @rbuf << @io.read_nonblock(BUFSIZE) # line 141
      rescue IO::WaitReadable
        ...
      rescue IO::WaitWritable
        ...
      end
    end

which rescues IO::WaitReadable and IO::WaitWritable, but not
EWOULDBLOCK. I wonder whether I do something wrong (should I rescue it
?) or it is a weakness of the Net library (on Windows maybe ?).

_md

-- 
Posted via http://www.ruby-forum.com/.