Couldn't we simply use an ensure here?

```ruby
def call(env)
  @app.call(env)
ensure
  ActiveRecord::Base.clear_active_connections!
end
```

Since ensure doesn't return it's last expression this would work in both cases.