call StartHttpServer() early as soon as possible

This commit is contained in:
Mihail Slobodyanuk 2022-12-20 21:17:16 +02:00
parent 4042cf3118
commit 5469f3506b

View file

@ -275,6 +275,9 @@ func run(args yggArgs, ctx context.Context) {
}
}
// Start HTTP server
n.admin.StartHttpServer(args.useconffile, cfg)
// Setup the multicast module.
{
options := []multicast.SetupOption{}
@ -317,8 +320,6 @@ func run(args yggArgs, ctx context.Context) {
logger.Infof("Your public key is %s", hex.EncodeToString(public[:]))
logger.Infof("Your IPv6 address is %s", address.String())
logger.Infof("Your IPv6 subnet is %s", subnet.String())
// Start HTTP server
n.admin.StartHttpServer(args.useconffile, cfg)
// Block until we are told to shut down.
<-ctx.Done()