Browse Source

Better string for reconnect

Andrew Kane 8 years ago
parent
commit
d329015c02
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/blazer/adapters/sql_adapter.rb

+ 1 - 1
lib/blazer/adapters/sql_adapter.rb

@@ -34,7 +34,7 @@ module Blazer
         rescue => e
         rescue => e
           error = e.message.sub(/.+ERROR: /, "")
           error = e.message.sub(/.+ERROR: /, "")
           error = Blazer::TIMEOUT_MESSAGE if Blazer::TIMEOUT_ERRORS.any? { |e| error.include?(e) }
           error = Blazer::TIMEOUT_MESSAGE if Blazer::TIMEOUT_ERRORS.any? { |e| error.include?(e) }
-          reconnect if error.include?("can't get socket descriptor")
+          reconnect if error.include?("PG::ConnectionBad")
         end
         end
 
 
         [columns, rows, error]
         [columns, rows, error]