mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Fix memory leak on python 3.7 (#1200)
Close https://github.com/zalando/patroni/issues/1167
This commit is contained in:
@@ -492,6 +492,8 @@ class RestApiHandler(BaseHTTPRequestHandler):
|
||||
|
||||
|
||||
class RestApiServer(ThreadingMixIn, HTTPServer, Thread):
|
||||
# On 3.7+ the `ThreadingMixIn` gathers all non-daemon worker threads in order to join on them at server close.
|
||||
daemon_threads = True # Make worker threads "fire and forget" to prevent a memory leak.
|
||||
|
||||
def __init__(self, patroni, config):
|
||||
self.patroni = patroni
|
||||
|
||||
Reference in New Issue
Block a user