fix bug: func RouterFromContext return nil router

This commit is contained in:
root
2023-09-29 14:18:29 +09:00
parent af9fb2084a
commit 00ec5b2d4d
2 changed files with 4 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
package sing
import (
"context"
"crypto/rand"
"encoding/base64"
"fmt"
@@ -215,8 +214,9 @@ func (b *Box) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) er
if err != nil {
return err
}
in, err := inbound.New(
context.Background(),
b.ctx,
b.router,
b.logFactory.NewLogger(F.ToString("inbound/", c.Type, "[", tag, "]")),
c,