diff --git a/lib/makara/connection_wrapper.rb b/lib/makara/connection_wrapper.rb index 51ccf617..17749ab2 100644 --- a/lib/makara/connection_wrapper.rb +++ b/lib/makara/connection_wrapper.rb @@ -44,7 +44,7 @@ def _makara_blacklisted? end def _makara_in_transaction? - @connection && @connection.open_transactions > 0 + @connection && @connection.respond_to?(:open_transactions) && @connection.open_transactions > 0 end # blacklist this node for @config[:blacklist_duration] seconds