From 6559b21c163212bbee5a3b71b41558f63c4ad973 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Tue, 17 Oct 2023 12:32:48 +0100 Subject: [PATCH] Don't wait for HTTP request to unlock router within manager --- router/manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router/manager.go b/router/manager.go index bcfd4cc..e8683aa 100644 --- a/router/manager.go +++ b/router/manager.go @@ -48,8 +48,9 @@ func NewManager(db *sql.DB, proxy *proxy.HybridTransport) *Manager { func (m *Manager) ServeHTTP(rw http.ResponseWriter, req *http.Request) { m.s.RLock() - m.r.ServeHTTP(rw, req) + r := m.r m.s.RUnlock() + r.ServeHTTP(rw, req) } func (m *Manager) Compile() {