mirror of
https://github.com/donl/gPanel.git
synced 2026-05-31 06:12:34 -06:00
unlock was in the wrong place for mutex in router
This commit is contained in:
parent
5d1234089e
commit
4b2fed1f76
1 changed files with 1 additions and 1 deletions
|
|
@ -59,11 +59,11 @@ func New() *Router {
|
|||
Director: func(req *http.Request) {
|
||||
mutex.Lock()
|
||||
if d, ok := domainToPort[req.Host]; ok {
|
||||
mutex.Unlock()
|
||||
req.Header.Set("Host", req.Host)
|
||||
req.URL.Scheme = "http"
|
||||
req.URL.Host = "127.0.0.1:" + strconv.Itoa(d)
|
||||
}
|
||||
mutex.Unlock()
|
||||
},
|
||||
},
|
||||
ReadTimeout: 5 * time.Second,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue