对齐 WSS 流程并更新配置
This commit is contained in:
@@ -354,7 +354,7 @@ func (s *WSSSession) sendRegisterGroup(ctx context.Context) error {
|
||||
|
||||
func (s *WSSSession) callWSLaunch(ctx context.Context) error {
|
||||
req := &wsLaunchReq{UID: s.uid, GUID: s.guid, UA: WSSInitUA}
|
||||
resp, err := s.callWUPWithRequestID(ctx, "launch", "wsLaunch", req, -1)
|
||||
resp, err := s.callWUPWithRequestIDAndTrace(ctx, "launch", "wsLaunch", req, -1, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -428,6 +428,10 @@ func (s *WSSSession) callWUP(ctx context.Context, service, method string, reqStr
|
||||
}
|
||||
|
||||
func (s *WSSSession) callWUPWithRequestID(ctx context.Context, service, method string, reqStruct taf.Marshaler, requestID int32) (*wup.Response, error) {
|
||||
return s.callWUPWithRequestIDAndTrace(ctx, service, method, reqStruct, requestID, NewWSSCommandTrace())
|
||||
}
|
||||
|
||||
func (s *WSSSession) callWUPWithRequestIDAndTrace(ctx context.Context, service, method string, reqStruct taf.Marshaler, requestID int32, traceID string) (*wup.Response, error) {
|
||||
wupReq := wup.NewRequest(service, method, requestID)
|
||||
wupReq.Timeout = 0
|
||||
if err := wupReq.WriteStruct("tReq", reqStruct); err != nil {
|
||||
@@ -439,7 +443,7 @@ func (s *WSSSession) callWUPWithRequestID(ctx context.Context, service, method s
|
||||
}
|
||||
ctx, cancel := s.withTimeout(ctx)
|
||||
defer cancel()
|
||||
payload, err := EncodeWSSCommand(WSSCmdWupReq, data, NewWSSCommandTrace())
|
||||
payload, err := EncodeWSSCommand(WSSCmdWupReq, data, traceID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user