Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-common
Commits
0dd8eeac
Commit
0dd8eeac
authored
Aug 03, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:优化socket打点
parent
2e556869
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
user_center_func.go
rpc/user_center_func.go
+3
-4
No files found.
rpc/user_center_func.go
View file @
0dd8eeac
...
@@ -414,17 +414,16 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
...
@@ -414,17 +414,16 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
Timestamp
:
time
.
Now
()
.
UnixNano
(),
Timestamp
:
time
.
Now
()
.
UnixNano
(),
User
:
micUserData
,
User
:
micUserData
,
}
}
n
:=
0
if
buffer
,
err
:=
proto
.
Marshal
(
msg
);
err
==
nil
{
if
buffer
,
err
:=
proto
.
Marshal
(
msg
);
err
==
nil
{
userIds
:=
[]
uint64
{
userId
}
userIds
:=
[]
uint64
{
userId
}
var
rspUids
[]
uint64
var
rspUids
[]
uint64
n
:=
0
for
{
for
{
n
++
n
++
rspUids
,
err
=
multicast
(
userIds
,
MsgTypeGroupMicChange
,
buffer
,
time
.
Duration
(
10
))
rspUids
,
err
=
multicast
(
userIds
,
MsgTypeGroupMicChange
,
buffer
,
time
.
Duration
(
10
))
if
n
>=
3
||
len
(
rspUids
)
<=
0
{
if
n
>=
3
||
len
(
rspUids
)
<=
0
{
break
break
}
}
mylogrus
.
MyLog
.
Infof
(
"grpc SendSocketMicChange send fail,seqId:%v,retry:%v,data:%v"
,
seqId
,
n
,
*
msg
)
time
.
Sleep
(
time
.
Millisecond
*
200
)
time
.
Sleep
(
time
.
Millisecond
*
200
)
}
}
...
@@ -435,10 +434,10 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
...
@@ -435,10 +434,10 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
}(
userId
,
msg
,
rspUids
,
err
)
}(
userId
,
msg
,
rspUids
,
err
)
if
err
!=
nil
{
if
err
!=
nil
{
mylogrus
.
MyLog
.
Errorf
(
"grpc SendSocketMicChange send fail
"
)
mylogrus
.
MyLog
.
Errorf
(
"grpc SendSocketMicChange send fail
,seqId:%v,retry:%v,data:%v,err:%v"
,
seqId
,
n
,
*
msg
,
err
)
return
err
return
err
}
else
{
}
else
{
mylogrus
.
MyLog
.
Info
(
"grpc SendSocketMicChange send success"
)
mylogrus
.
MyLog
.
Info
f
(
"grpc SendSocketMicChange send success,seqId:%v,retry:%v,data:%v"
,
seqId
,
n
,
*
msg
)
}
}
}
else
{
}
else
{
return
err
return
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment