Browse Source

Amend StartHTTPServer() too for consistency's sake

pull/2461/head
Alessio Treglia 6 years ago
parent
commit
23bfb4c2e9
No known key found for this signature in database GPG Key ID: E8A48AE5311D765A
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      rpc/lib/server/http_server.go

+ 7
- 6
rpc/lib/server/http_server.go View File

@ -56,13 +56,14 @@ func StartHTTPServer(
listener = netutil.LimitListener(listener, config.MaxOpenConnections) listener = netutil.LimitListener(listener, config.MaxOpenConnections)
} }
go func() {
err := http.Serve(
listener,
RecoverAndLogHandler(maxBytesHandler{h: handler, n: maxBodyBytes}, logger),
)
err = http.Serve(
listener,
RecoverAndLogHandler(maxBytesHandler{h: handler, n: maxBodyBytes}, logger),
)
if err != nil {
logger.Info("RPC HTTP server stopped", "err", err) logger.Info("RPC HTTP server stopped", "err", err)
}()
return nil, err
}
return listener, nil return listener, nil
} }


Loading…
Cancel
Save