from to discord buffer warning
This commit is contained in:
parent
c94362581a
commit
fd4884cdb6
|
@ -62,7 +62,6 @@ func (m *MumbleDuplex) fromMumbleMixer(ctx context.Context, cancel context.Cance
|
||||||
m.mumbleSleepTick.Start(10 * time.Millisecond)
|
m.mumbleSleepTick.Start(10 * time.Millisecond)
|
||||||
|
|
||||||
sendAudio := false
|
sendAudio := false
|
||||||
bufferWarning := false
|
|
||||||
|
|
||||||
droppingPackets := false
|
droppingPackets := false
|
||||||
droppingPacketCount := 0
|
droppingPacketCount := 0
|
||||||
|
@ -117,18 +116,6 @@ func (m *MumbleDuplex) fromMumbleMixer(ctx context.Context, cancel context.Cance
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(toDiscord) > 20 {
|
|
||||||
if !bufferWarning {
|
|
||||||
log.Println("Warning: toDiscord buffer size")
|
|
||||||
bufferWarning = true
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if bufferWarning {
|
|
||||||
log.Println("Resolved: toDiscord buffer size")
|
|
||||||
bufferWarning = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
promToDiscordBufferSize.Set(float64(len(toDiscord)))
|
promToDiscordBufferSize.Set(float64(len(toDiscord)))
|
||||||
select {
|
select {
|
||||||
case toDiscord <- outBuf:
|
case toDiscord <- outBuf:
|
||||||
|
|
Loading…
Reference in New Issue