Detect client closing connection Blazor
问题 I have a loop that I have got running the whole time the client is on the page but I got no way to close the loop so that always remains running even when the user already disconnected. Is there a lifecycle method that runs when the user closes the connection? or is there a different way? 回答1: I'm not sure just implementing the IDisposable Interface can help you here, but implementing the Blazor Server circuit handler may. I vaguely recall that a similar question to yours was asked in