update core to 0.0.5 (#1540)
* update core * sort imports * fix typos * redundant types
This commit is contained in:
+6
-6
@@ -1162,11 +1162,11 @@ func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, dp
|
||||
var dpData []byte
|
||||
|
||||
participants := r.GetLocalParticipants()
|
||||
cap := len(dest)
|
||||
if cap == 0 {
|
||||
cap = len(participants)
|
||||
capacity := len(dest)
|
||||
if capacity == 0 {
|
||||
capacity = len(participants)
|
||||
}
|
||||
destParticpants := make([]types.LocalParticipant, 0, cap)
|
||||
destParticipants := make([]types.LocalParticipant, 0, capacity)
|
||||
|
||||
for _, op := range participants {
|
||||
if op.State() != livekit.ParticipantInfo_ACTIVE {
|
||||
@@ -1195,10 +1195,10 @@ func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, dp
|
||||
return
|
||||
}
|
||||
}
|
||||
destParticpants = append(destParticpants, op)
|
||||
destParticipants = append(destParticipants, op)
|
||||
}
|
||||
|
||||
utils.ParallelExec(destParticpants, dataForwardLoadBalanceThreshold, 1, func(op types.LocalParticipant) {
|
||||
utils.ParallelExec(destParticipants, dataForwardLoadBalanceThreshold, 1, func(op types.LocalParticipant) {
|
||||
err := op.SendDataPacket(dp, dpData)
|
||||
if err != nil && !errors.Is(err, io.ErrClosedPipe) {
|
||||
op.GetLogger().Infow("send data packet error", "error", err)
|
||||
|
||||
Reference in New Issue
Block a user