mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 05:55:20 -05:00
Refine code according to golangci-lint results
This commit is contained in:
@@ -39,7 +39,7 @@ func (s *routingServer) TestRoute(ctx context.Context, request *TestRouteRequest
|
||||
return nil, err
|
||||
}
|
||||
if request.PublishResult && s.routingStats != nil {
|
||||
ctx, _ := context.WithTimeout(context.Background(), 4*time.Second) // nolint: govet
|
||||
ctx, _ := context.WithTimeout(context.Background(), 4*time.Second)
|
||||
s.routingStats.Publish(ctx, route)
|
||||
}
|
||||
return AsProtobufMessage(request.FieldSelectors)(route), nil
|
||||
@@ -54,7 +54,7 @@ func (s *routingServer) SubscribeRoutingStats(request *SubscribeRoutingStatsRequ
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer stats.UnsubscribeClosableChannel(s.routingStats, subscriber) // nolint: errcheck
|
||||
defer stats.UnsubscribeClosableChannel(s.routingStats, subscriber)
|
||||
for {
|
||||
select {
|
||||
case value, ok := <-subscriber:
|
||||
|
||||
Reference in New Issue
Block a user