mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[fix]平台发送的mqtt push放行
This commit is contained in:
@@ -175,7 +175,11 @@ func (s *HookGrpcService) OnMessagePublish(ctx context.Context, in *exhook2.Mess
|
||||
res := &exhook2.ValuedResponse{}
|
||||
res.Type = exhook2.ValuedResponse_STOP_AND_RETURN
|
||||
res.Value = &exhook2.ValuedResponse_BoolResult{BoolResult: false}
|
||||
|
||||
//服务端的HTTP请求放行
|
||||
if in.GetMessage().From == "http_api" {
|
||||
res.Value = &exhook2.ValuedResponse_BoolResult{BoolResult: true}
|
||||
return res, nil
|
||||
}
|
||||
etoken := &global_model.DeviceAuth{}
|
||||
etoken.GetDeviceToken(in.Message.Headers["username"])
|
||||
// 获取topic类型
|
||||
|
||||
@@ -2,7 +2,6 @@ package updserver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"pandax/pkg/global"
|
||||
)
|
||||
@@ -38,7 +37,6 @@ func (s *UdpServer) Start(ctx context.Context) error {
|
||||
global.Log.Errorf("error http serve: %s", err)
|
||||
return err
|
||||
}
|
||||
fmt.Println("UDP server started, listening on", listener.LocalAddr().String())
|
||||
s.listener = listener
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user