update core to 0.0.5 (#1540)

* update core

* sort imports

* fix typos

* redundant types
This commit is contained in:
David Colburn
2023-03-22 16:53:23 -07:00
committed by GitHub
parent 0ea88e4025
commit 191a9e8014
41 changed files with 272 additions and 263 deletions
+6 -6
View File
@@ -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)