diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-04-28 12:25:48 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-04-28 12:26:07 +0100 |
commit | 6037349512d7fee303adad908b01d0a990715833 (patch) | |
tree | 9e97b6a549054821c0dcf8ee3cc184269ae7eeae /synapse/http | |
parent | Report per request metrics for all of the things using request_handler (diff) | |
download | synapse-6037349512d7fee303adad908b01d0a990715833.tar.xz |
Check if report_metrics is True
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/server.py | 7 |
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 |