Skip to content

Commit

Permalink
Don't disconnect a nil activerecord connection
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Oct 25, 2020
1 parent 00f169d commit dd98726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/good_job/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def with_listen_connection
pg_conn.exec("SET application_name = #{pg_conn.escape_identifier(self.class.name)}")
yield pg_conn
ensure
ar_conn.disconnect!
ar_conn&.disconnect!
end
end
end

0 comments on commit dd98726

Please sign in to comment.