one line concurrency change
This commit is contained in:
parent
0aedf80727
commit
e4d6348fc3
@ -76,7 +76,7 @@ func (s *VinegarHttpServlet) ServeHTTP(w http.ResponseWriter, req *http.Request)
|
|||||||
for _, route := range s.Routes {
|
for _, route := range s.Routes {
|
||||||
if route.Pattern.MatchString(path) {
|
if route.Pattern.MatchString(path) {
|
||||||
//fmt.Printf("SERVING: [%s]=>{%s}\n", path, route.Pattern.String())
|
//fmt.Printf("SERVING: [%s]=>{%s}\n", path, route.Pattern.String())
|
||||||
route.Handler(w, req)
|
go route.Handler(w, req)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ const (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
lru map[string]*LruEntry
|
lru map[string]*LruEntry
|
||||||
|
|
||||||
Lru struct {
|
Lru struct {
|
||||||
entries *lru
|
entries *lru
|
||||||
limit int64
|
limit int64
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user