Skip to content

Commit

Permalink
rpc: use HTTP request context as top-level context (ethereum#16861)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanschneider authored and firmianavan committed Aug 28, 2018
1 parent 735d5ab commit d46c62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// All checks passed, create a codec that reads direct from the request body
// untilEOF and writes the response to w and order the server to process a
// single request.
ctx := context.Background()
ctx := r.Context()
ctx = context.WithValue(ctx, "remote", r.RemoteAddr)
ctx = context.WithValue(ctx, "scheme", r.Proto)
ctx = context.WithValue(ctx, "local", r.Host)
Expand Down

0 comments on commit d46c62f

Please # to comment.