Skip to content

Rails 6.1: Raise ActiveRecord::ConnectionNotEstablished on calls to execute with a disconnected connection. #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "check connection active to prevent usage of dead/closed conne…
…ction"

This reverts commit 6861763.
  • Loading branch information
mgrunberg committed Apr 27, 2021
commit 91701a633c1361cfd858cc99c8f73c88b769f4d9
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def finish_statement_handle(handle)
end

def ensure_established_connection!
raise TinyTds::Error, 'SQL Server client is not connected' if @connection.nil? || !@connection.active?
raise TinyTds::Error, 'SQL Server client is not connected' unless @connection

yield
end
Expand Down