If you want to think of it as a bug feel
If you want to think of it as a bug feel free. But just keep in mind that theres 0 expectation of close events of any form running. It will generally run for the most part but not always
state.getWebsockets.length will get your the current active count.state.getWebsockets.length you'll get a reasonable count for that instance. I still don't recall why you don't want to use that?state.getWebSockets().lengthsetTimeout()?state.getWebsockets.lengthstate.getWebsockets.lengthstate.getWebSockets().length