diff options
-rwxr-xr-x | prometheus.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prometheus.py b/prometheus.py index 676b6fc..4ffbcfd 100755 --- a/prometheus.py +++ b/prometheus.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import logging -from http.server import BaseHTTPRequestHandler, HTTPServer +from http.server import BaseHTTPRequestHandler, HTTPServer, ThreadingHTTPServer from socket import AF_INET6 from time import time from urllib.parse import parse_qs, urlparse @@ -126,7 +126,7 @@ class Prometheus: def listen(self, addr=("127.0.0.1", 8080)): if "::" in addr[0]: HTTPServer.address_family = AF_INET6 - server = HTTPServer(addr, DynamicMetricsHandler.factory(self.handler)) + server = ThreadingHTTPServer(addr, DynamicMetricsHandler.factory(self.handler)) server.serve_forever() |