We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae7f1cf commit fa81e21Copy full SHA for fa81e21
lib/mongo/socket.rb
@@ -543,6 +543,7 @@ def write_chunk(chunk, timeout)
543
def wait_for_socket_to_be_writable(deadline)
544
select_timeout = deadline - Utils.monotonic_time
545
rv = Kernel.select(nil, [@socket], nil, select_timeout)
546
+
547
if BSON::Environment.jruby?
548
# Ignore the return value of Kernel.select.
549
# On JRuby, select appears to return nil prior to timeout expiration
@@ -551,11 +552,9 @@ def wait_for_socket_to_be_writable(deadline)
551
552
# Check the deadline ourselves.
553
554
return select_timeout > 0
- elsif rv.nil?
555
- return false
556
end
557
558
- true
+ !rv.nil?
559
560
561
def unix_socket?(sock)
0 commit comments