You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUBY-2132 stop connecting connections in ensure_connected (#1937)
* RUBY-2132 stop connecting connections in ensure_connected
* fix perished connection tests
* remove this test since it does not terminate thread prematurely as it claims
Co-authored-by: Oleg Pudeyev <oleg@bsdpower.com>
Copy file name to clipboardExpand all lines: lib/mongo/server/connection.rb
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -152,12 +152,12 @@ def error?
152
152
#
153
153
# @since 2.0.0
154
154
defconnect!
155
+
iferror?
156
+
raiseError::ConnectionPerished,"Connection #{generation}:#{id} for #{address.seed} is perished. Reconnecting closed or errored connections is no longer supported"
157
+
end
158
+
155
159
ifclosed?
156
-
ifLint.enabled?
157
-
raiseError::LintError,"Reconnecting closed connections is no longer supported (for #{address})"
158
-
else
159
-
log_warn("Reconnecting closed connections is deprecated (for #{address})")
160
-
end
160
+
raiseError::ConnectionPerished,"Connection #{generation}:#{id} for #{address.seed} is closed. Reconnecting closed or errored connections is no longer supported"
0 commit comments