Limited post send size and post syncing is working for small posts 😮
This commit is contained in:
@@ -707,6 +707,11 @@ class PeerConnection {
|
||||
|
||||
this.messageSuperlog && console.log.apply(null, log(`[${logID(this.remotePeerID)}]<-datachannel[${logID(this.peerManager.peerID)}]:`, message.type, message, `message size:${messageJSON.length}`));
|
||||
|
||||
if (messageJSON.length > (32 * 1024)) {
|
||||
this.messageSuperlog && console.log.apply(null, log(`[datachannel] Not sending long message: `, messageJSON.length));
|
||||
return;
|
||||
}
|
||||
|
||||
this.dataChannel?.send(messageJSON);
|
||||
|
||||
// this.onMessage(messageJSON);
|
||||
|
||||
Reference in New Issue
Block a user