Skip to content

Commit

Permalink
remove limits on concurrent requests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed Dec 29, 2021
1 parent 82561bd commit 1f1209c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions fs/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,6 @@ func (s *Server) Serve(fs FS) error {
})
s.handle = append(s.handle, nil)

N := 128
jobQueue := make(chan struct{}, N)
for i := 0; i < N; i++ {
jobQueue <- struct{}{}
}

for {
req, err := s.conn.ReadRequest()
if err != nil {
Expand All @@ -518,14 +512,7 @@ func (s *Server) Serve(fs FS) error {
return err
}

<- jobQueue
go func() {
defer func() {
jobQueue <-struct {}{}
}()
s.serve(req)
}()

go s.serve(req)

}

Expand Down

0 comments on commit 1f1209c

Please sign in to comment.