When writing services, it’s tempting to predicate resource cleanup on client disconnects and other external signals. But this is a recipe for resource leaks. (There are many customers who will accidentally leave WebSockets open and so forth.) Besides, it’s bad for a program to externalize its resource management.