Skip to content

Commit

Permalink
Merge pull request #29785 from cswilliams/rescue_postgres_connection_…
Browse files Browse the repository at this point in the history
…errors_on_dealloc

Catch postgres connection errors when trying to dealloc
  • Loading branch information
sgrif authored and kamipo committed Jan 3, 2018
1 parent 9fe3a52 commit fedca47
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -198,6 +198,7 @@ def []=(sql, key)

def dealloc(key)
@connection.query "DEALLOCATE #{key}" if connection_active?
rescue PG::Error
end

def connection_active?
Expand Down

0 comments on commit fedca47

Please sign in to comment.