Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu committed Feb 8, 2024
1 parent 1e48cc0 commit 9c8a3e1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import (
var (
cmdName = "avalanche-rosetta"
cmdVersion = service.MiddlewareVersion

defaultReadTimeout = 10 * time.Second
defaultWriteTimeout = 10 * time.Second
)

var opts struct {
Expand Down Expand Up @@ -194,9 +197,10 @@ func main() {
log.Printf("starting rosetta server at %s\n", cfg.ListenAddr)

server := &http.Server{
Addr: cfg.ListenAddr,
Handler: router,
ReadHeaderTimeout: 30 * time.Second,
Addr: cfg.ListenAddr,
Handler: router,
ReadTimeout: defaultReadTimeout,
WriteTimeout: defaultWriteTimeout,
}

log.Fatal(server.ListenAndServe())
Expand Down

0 comments on commit 9c8a3e1

Please sign in to comment.