summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-04-28 12:25:48 +0100
committerMark Haines <mark.haines@matrix.org>2016-04-28 12:26:07 +0100
commit6037349512d7fee303adad908b01d0a990715833 (patch)
tree9e97b6a549054821c0dcf8ee3cc184269ae7eeae /synapse/http
parentReport per request metrics for all of the things using request_handler (diff)
downloadsynapse-6037349512d7fee303adad908b01d0a990715833.tar.xz
Check if report_metrics is True
Diffstat (limited to '')
-rw-r--r--synapse/http/server.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index d4d639f617..2c131a7017 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -144,9 +144,10 @@ def wrap_request_handler(request_handler, report_metrics):
                     )
                 finally:
                     try:
-                        request_metrics.stop(
-                            self.clock, request, self.__class__.__name__
-                        )
+                        if report_metrics:
+                            request_metrics.stop(
+                                self.clock, request, self.__class__.__name__
+                            )
                     except:
                         pass
     return wrapped_request_handler