Skip to content

Commit

Permalink
Merge e95f518 into 73cf43d
Browse files Browse the repository at this point in the history
  • Loading branch information
jprobinson committed Feb 20, 2019
2 parents 73cf43d + e95f518 commit 87165d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/kit/kitserver.go
Expand Up @@ -43,6 +43,8 @@ type Server struct {
svr *http.Server
gsvr *grpc.Server

handler http.Handler

// exit chan for graceful shutdown
exit chan chan error
}
Expand Down Expand Up @@ -172,11 +174,13 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
s.errs.Flush()
}
}()
s.svc.HTTPMiddleware(s.mux).ServeHTTP(w, r)
s.handler.ServeHTTP(w, r)
}

func (s *Server) register(svc Service) {
s.svc = svc
s.handler = s.svc.HTTPMiddleware(s.mux)

opts := []httptransport.ServerOption{
// populate context with helpful keys
httptransport.ServerBefore(func(ctx context.Context, r *http.Request) context.Context {
Expand Down

0 comments on commit 87165d9

Please sign in to comment.