mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 16:41:30 +00:00
Minor fixes
This commit is contained in:
parent
3e5bee6faf
commit
968430c338
|
@ -45,6 +45,7 @@ func newSTDServer(ctx context.Context, logger log.Logger, options option.Inbound
|
||||||
var err error
|
var err error
|
||||||
if options.ACME != nil && len(options.ACME.Domain) > 0 {
|
if options.ACME != nil && len(options.ACME.Domain) > 0 {
|
||||||
tlsConfig, acmeService, err = startACME(ctx, common.PtrValueOrDefault(options.ACME))
|
tlsConfig, acmeService, err = startACME(ctx, common.PtrValueOrDefault(options.ACME))
|
||||||
|
//nolint:staticcheck
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,7 @@ func (s *StatsService) GetSysStats(ctx context.Context, request *SysStatsRequest
|
||||||
func (s *StatsService) mustEmbedUnimplementedStatsServiceServer() {
|
func (s *StatsService) mustEmbedUnimplementedStatsServiceServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:staticcheck
|
||||||
func (s *StatsService) loadOrCreateCounter(name string, counter *atomic.Int64) *atomic.Int64 {
|
func (s *StatsService) loadOrCreateCounter(name string, counter *atomic.Int64) *atomic.Int64 {
|
||||||
counter, loaded := s.counters[name]
|
counter, loaded := s.counters[name]
|
||||||
if !loaded {
|
if !loaded {
|
||||||
|
|
|
@ -55,7 +55,7 @@ func TestMuxCoolServer(t *testing.T) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
testSuit(t, clientPort, testPort)
|
testSuitSimple(t, clientPort, testPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMuxCoolClient(t *testing.T) {
|
func TestMuxCoolClient(t *testing.T) {
|
||||||
|
@ -105,7 +105,7 @@ func TestMuxCoolClient(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
testSuit(t, clientPort, testPort)
|
testSuitSimple(t, clientPort, testPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMuxCoolSelf(t *testing.T) {
|
func TestMuxCoolSelf(t *testing.T) {
|
||||||
|
@ -166,5 +166,5 @@ func TestMuxCoolSelf(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
testSuit(t, clientPort, testPort)
|
testSuitSimple(t, clientPort, testPort)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue