Don't wait for HTTP request to unlock router within manager

This commit is contained in:
Melon 2023-10-17 12:32:48 +01:00
parent f268656b20
commit 6559b21c16
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -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() {