lib/mongo/collection/view/change_stream.rb in mongo-2.15.0.alpha vs lib/mongo/collection/view/change_stream.rb in mongo-2.15.0

- old
+ new

@@ -1,5 +1,8 @@ +# frozen_string_literal: true +# encoding: utf-8 + # Copyright (C) 2017-2020 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -201,10 +204,10 @@ # @since 2.5.0 def close unless closed? begin @cursor.close - rescue Error::OperationFailure + rescue Error::OperationFailure, Error::SocketError, Error::SocketTimeoutError # ignore end @cursor = nil end end