Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tornado: Support clearing a handler more than once.

Alex Vandiverc741c527d7cc
diff --git a/zerver/tornado/handlers.py b/zerver/tornado/handlers.py
index 1f1fc13d367..00a1f9694e9 100644
--- a/zerver/tornado/handlers.py
+++ b/zerver/tornado/handlers.py
@@ -37,7 +37,8 @@ def allocate_handler_id(handler: "AsyncDjangoHandler") -> int:
def clear_handler_by_id(handler_id: int) -> None:
- del handlers[handler_id]
+ if handler_id in handlers:
+ del handlers[handler_id]
def handler_stats_string() -> str: