// If self.producer_pool.get() returned a message
// send it as a binary using the RTCDataChannel.
// logger.critical(f"> Sending MSG {msg.message} ID: {msg.id}")
self.channel.send(msg.to_bytes()) // type: ignore
except Exception as e:
log = f"Got an exception in WebRTCConnection producer. {e}"
logger.error(log)
After Change
// send it as a binary using the RTCDataChannel.
// logger.critical(f"> Sending MSG {msg.message} ID: {msg.id}")
data = msg.to_bytes()
data_len = len(data)
if DC_CHUNKING_ENABLED and data_len > DC_MAX_CHUNK_SIZE:
chunk_num = 0
done = False