fix broken startup on disabled servers
This commit is contained in:
@ -44,13 +44,11 @@ func (a *App) MustRun() {
|
||||
// Prepare GRPC first. The GRPC server may update its opts
|
||||
// with a prepared GRPC-Gateway runtime.ServeMux if any of its services
|
||||
// have added GRPC-Gateway handlers. If present, serve under api path
|
||||
if a.cfg.GRPCEnabled() {
|
||||
a.runGRPC(ctx)
|
||||
}
|
||||
a.runGRPC(ctx)
|
||||
|
||||
if a.cfg.HTTPEnabled() {
|
||||
a.runHTTP(ctx)
|
||||
}
|
||||
// Second, prepare and run HTTP server, embedding grpc-gateway
|
||||
// runtime.ServeMux if set by runGRPC()
|
||||
a.runHTTP(ctx)
|
||||
|
||||
// Monitor app lifecycle
|
||||
go a.monitor()
|
||||
|
Reference in New Issue
Block a user