Closed
Description
Split out from #48396
We don't want to keep the circuit open forever if it's not in use anymore.
Need to decide upon the criteria indicating that a circuit should be closed.
- Waiting until all server components are gone is an option, but what if a DotNetObjectReference is still in use?
- Could have a sort of "reference counting" approach and wait for all DotNetObjectReferences to be disposed.
- But then what do we do about internal uses of .NET object references? Should we ignore them somehow?
Proposal: just trigger it based on the components only, because this is a UI system, not a general server/client communication channel. Developers who want some kind of headless server/client comms channel can either use SignalR, or they can use DotNetObjectReference
but have an invisible placeholder component to keep the circuit alive.