Skip to content

Commit

Permalink
OP-22464: Added read/write timeouts in the server (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Utkarsh Shukla <[email protected]>
  • Loading branch information
utkarsh-opsmx and Utkarsh Shukla authored Jan 17, 2025
1 parent 657e26f commit ce49c92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/serviceconfig/service_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func addDefaults(ctx context.Context, server *http.Server) {
server.BaseContext = func(net.Listener) context.Context { return ctx }
server.IdleTimeout = 4 * time.Second
server.ReadHeaderTimeout = 4 * time.Second
server.ReadTimeout = 4 * time.Second
server.WriteTimeout = 8 * time.Second
}

func fixedIdentityAPIHandlerMaker(em EchoManager, routes Destinations, service IncomingServiceConfig) func(http.ResponseWriter, *http.Request) {
Expand Down

0 comments on commit ce49c92

Please sign in to comment.