Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Oct 16, 2024
1 parent 8db3ba4 commit 82bfa73
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions v2/hcore/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ var (
func (s *CoreService) GetSystemInfo(req *common.Empty, stream grpc.ServerStreamingServer[SystemInfo]) error {
if statusClient == nil {
statusClient = libbox.NewCommandClient(
&CommandClientHandler{},
&CommandClientHandler{
logger: coreLogFactory.NewLogger("[SystemInfo Command Client]"),
// port: s.port,
},
&libbox.CommandClientOptions{
Command: libbox.CommandStatus,
StatusInterval: 1000000000, // 1000ms debounce
Expand Down Expand Up @@ -56,7 +59,10 @@ func (s *CoreService) GetSystemInfo(req *common.Empty, stream grpc.ServerStreami
func (s *CoreService) OutboundsInfo(req *common.Empty, stream grpc.ServerStreamingServer[OutboundGroupList]) error {
if groupClient == nil {
groupClient = libbox.NewCommandClient(
&CommandClientHandler{},
&CommandClientHandler{
logger: coreLogFactory.NewLogger("[OutboundsInfo Command Client]"),
// port: s.port,
},
&libbox.CommandClientOptions{
Command: libbox.CommandGroup,
StatusInterval: 500000000, // 500ms debounce
Expand Down Expand Up @@ -88,7 +94,10 @@ func (s *CoreService) OutboundsInfo(req *common.Empty, stream grpc.ServerStreami
func (s *CoreService) MainOutboundsInfo(req *common.Empty, stream grpc.ServerStreamingServer[OutboundGroupList]) error {
if groupInfoOnlyClient == nil {
groupInfoOnlyClient = libbox.NewCommandClient(
&CommandClientHandler{},
&CommandClientHandler{
logger: coreLogFactory.NewLogger("[MainOutboundsInfo Command Client]"),
// port: s.port,
},
&libbox.CommandClientOptions{
Command: libbox.CommandGroupInfoOnly,
StatusInterval: 500000000, // 500ms debounce
Expand Down

0 comments on commit 82bfa73

Please sign in to comment.