-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix connection leak when no connection open in the current thread (#22)
Follow-up for Envek/after_commit_everywhere#21 Fixes Envek/after_commit_everywhere#20 (specifically Envek/after_commit_everywhere#20 (comment)) Method `connected?` checks if there are any connections open, even in a different thread, while `active_connection?` checks for connection owned by current thread. See: - https://api.rubyonrails.org/v5.2.3/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html#method-i-active_connection-3F - https://api.rubyonrails.org/v5.2.3/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html#method-i-connected-3F
- Loading branch information
1 parent
880686a
commit d23b57d
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters