Skip to content

Commit dbb2169

Browse files
committed
Use reconnect! method in #with_auto_reconnect block since that single method does the connect and return active? all in one.
1 parent 0dc8e10 commit dbb2169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def auto_reconnected?
771771
while count <= 5
772772
sleep 2** count
773773
ActiveRecord::Base.did_retry_sqlserver_connection(self,count)
774-
return true if connect && active?
774+
return true if reconnect!
775775
count += 1
776776
end
777777
ActiveRecord::Base.did_loose_sqlserver_connection(self)

0 commit comments

Comments
 (0)