This commit is contained in:
ginuerzh
2022-03-17 22:41:08 +08:00
parent 26d322379d
commit bab2906aeb
2 changed files with 25 additions and 0 deletions

View File

@ -133,6 +133,10 @@ func (r *Router) Bind(ctx context.Context, network, address string, opts ...conn
var route *Route
if r.chain != nil {
route = r.chain.Route(network, address)
if route.Len() == 0 {
err = ErrEmptyRoute
return
}
}
if r.logger.IsLevelEnabled(logger.DebugLevel) {