mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
add support for tagged observer: fix
This commit is contained in:
parent
89a82ece8b
commit
1de2466c60
@ -30,13 +30,13 @@ func (s *service) GetOutboundStatus(ctx context.Context, request *GetOutboundSta
|
|||||||
if request.Tag == "" {
|
if request.Tag == "" {
|
||||||
observeResult, err := s.observatory.GetObservation(ctx)
|
observeResult, err := s.observatory.GetObservation(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newError("cannot get observation").Base(err)
|
return nil, newError("cannot get observation").Base(err)
|
||||||
}
|
}
|
||||||
result = observeResult
|
result = observeResult
|
||||||
} else {
|
} else {
|
||||||
observeResult, err := common.Must2(s.observatory.(features.TaggedFeatures).GetFeaturesByTag(request.Tag)).(extension.Observatory).GetObservation(s.ctx)
|
observeResult, err := common.Must2(s.observatory.(features.TaggedFeatures).GetFeaturesByTag(request.Tag)).(extension.Observatory).GetObservation(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newError("cannot get observation").Base(err)
|
return nil, newError("cannot get observation").Base(err)
|
||||||
}
|
}
|
||||||
result = observeResult
|
result = observeResult
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user