Skip to content

Commit

Permalink
Merge pull request #593 from akutz/bugfix/endpoint-service-init-order
Browse files Browse the repository at this point in the history
Endpoint/Service Init Order Fix
  • Loading branch information
akutz authored Jul 22, 2017
2 parents 670ae33 + cb162ff commit 6835fcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ func newServer(goCtx gocontext.Context, config gofig.Config) (*server, error) {

s.ctx.Info("initializing server")

if err := s.initEndpoints(s.ctx); err != nil {
if err := services.Init(s.ctx, s.config); err != nil {
return nil, err
}
s.ctx.Info("initialized endpoints")
s.ctx.Info("initialized services")

if err := services.Init(s.ctx, s.config); err != nil {
if err := s.initEndpoints(s.ctx); err != nil {
return nil, err
}
s.ctx.Info("initialized services")
s.ctx.Info("initialized endpoints")

if logConfig.HTTPRequests || logConfig.HTTPResponses {
s.logHTTPEnabled = true
Expand Down

0 comments on commit 6835fcb

Please sign in to comment.