aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvela-jabber <host@sum7.eu>2021-04-17 17:58:42 +0200
committervela-jabber <host@sum7.eu>2021-04-17 17:58:42 +0200
commitc42b0f8a51b944b358500fd70af5168fb508f5b4 (patch)
treed25a1f9860099d85050cbfcd9689baa2c3e60a4e
parentd2d8ef2880f256af752ac362fdba34d3f64c3526 (diff)
prometheus fix multithreadingHEADmaster
-rwxr-xr-xprometheus.py4
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()