mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-13 09:19:48 +00:00
Drop voice packets when it can be potentially blocking.
This commit is contained in:
parent
10cb16a450
commit
ee4574a5e1
@ -672,5 +672,9 @@ class VoiceClient:
|
||||
else:
|
||||
encoded_data = data
|
||||
packet = self._get_voice_packet(encoded_data)
|
||||
try:
|
||||
sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
|
||||
except BlockingIOError:
|
||||
log.warning('A packet has been dropped (seq: {0.sequence}, timestamp: {0.timestamp})'.format(self))
|
||||
|
||||
self.checked_add('timestamp', self.encoder.samples_per_frame, 4294967295)
|
||||
|
Loading…
x
Reference in New Issue
Block a user