mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-01-23 09:16:52 +00:00
Print stack if no context
This commit is contained in:
parent
9394674b63
commit
5491895a60
|
@ -11,6 +11,7 @@ import (
|
||||||
"os/user"
|
"os/user"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -631,6 +632,7 @@ func (r *Router) matchDNS(ctx context.Context) (context.Context, dns.Transport)
|
||||||
metadata := adapter.ContextFrom(ctx)
|
metadata := adapter.ContextFrom(ctx)
|
||||||
if metadata == nil {
|
if metadata == nil {
|
||||||
r.dnsLogger.WarnContext(ctx, "no context: ", reflect.TypeOf(ctx))
|
r.dnsLogger.WarnContext(ctx, "no context: ", reflect.TypeOf(ctx))
|
||||||
|
debug.PrintStack()
|
||||||
return ctx, r.defaultTransport
|
return ctx, r.defaultTransport
|
||||||
}
|
}
|
||||||
for i, rule := range r.dnsRules {
|
for i, rule := range r.dnsRules {
|
||||||
|
|
Loading…
Reference in a new issue