Skip to content

Commit

Permalink
Merge PR cosmos#4848: Rely on rpcserver.DefaultConfig() to inherit de…
Browse files Browse the repository at this point in the history
…fault config values
  • Loading branch information
Alessio Treglia authored and alexanderbez committed Aug 5, 2019
1 parent 478eda1 commit cf19802
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/lcd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ func (rs *RestServer) Start(listenAddr string, maxOpen int, readTimeout, writeTi
rs.log.Error("error closing listener", "err", err)
})

cfg := &rpcserver.Config{
MaxOpenConnections: maxOpen,
ReadTimeout: time.Duration(readTimeout) * time.Second,
WriteTimeout: time.Duration(writeTimeout) * time.Second,
}
cfg := rpcserver.DefaultConfig()
cfg.MaxOpenConnections = maxOpen
cfg.ReadTimeout = time.Duration(readTimeout) * time.Second
cfg.WriteTimeout = time.Duration(writeTimeout) * time.Second

rs.listener, err = rpcserver.Listen(listenAddr, cfg)
if err != nil {
Expand Down

0 comments on commit cf19802

Please sign in to comment.