diff --git a/zerver/tornado/handlers.py b/zerver/tornado/handlers.py index 063db261aa..51a1229ecd 100644 --- a/zerver/tornado/handlers.py +++ b/zerver/tornado/handlers.py @@ -210,9 +210,10 @@ class AsyncDjangoHandler(tornado.web.RequestHandler): # Register a Tornado handler that runs when client-side # connections are closed to notify the events system. # - # TODO: Theoretically, this code should run when you Ctrl-C - # curl to cause it to break a `GET /events` connection, but - # that seems to no longer run this code. Investigate what's up. + # Note that in the development environment, the development + # proxy does not correctly close connections to Tornado when + # its clients (e.g. `curl`) close their connections. This + # code path is thus _unreachable except in production_. client_descriptor = get_descriptor_by_handler_id(self.handler_id) if client_descriptor is not None: client_descriptor.disconnect_handler(client_closed=True)