From 26b474452c763e23686ca0fcf66849e215e75e53 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 4 Jan 2021 13:44:20 +1100 Subject: [PATCH] Removed connection logs --- src/network/Connection.js | 4 ---- src/network/Session.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/network/Connection.js b/src/network/Connection.js index a299911..40c490d 100644 --- a/src/network/Connection.js +++ b/src/network/Connection.js @@ -15,13 +15,11 @@ class Connection extends SimplePeer { this.dataChannels = {}; this.on("data", this.handleData); this.on("datachannel", this.handleDataChannel); - super._debug = console.log; } // Intercept the data event with decoding and chunking support handleData(packed) { const unpacked = decode(packed); - console.log("data", unpacked); // If the special property __chunked is set and true // The data is a partial chunk of the a larger file // So wait until all chunks are collected and assembled @@ -64,7 +62,6 @@ class Connection extends SimplePeer { if (packedData.byteLength > MAX_BUFFER_SIZE) { const chunks = this.chunk(packedData); for (let chunk of chunks) { - console.log("sending", chunk); if (this.dataChannels[channel]) { // Write to the stream to allow for buffer / backpressure handling this.dataChannels[channel].write(encode(chunk)); @@ -98,7 +95,6 @@ class Connection extends SimplePeer { this.dataChannels[channelName] = channel; channel.on("data", this.handleData.bind(this)); channel.on("error", (error) => { - console.error("error", error); this.emit("error", error); }); } diff --git a/src/network/Session.js b/src/network/Session.js index c95537f..f417432 100644 --- a/src/network/Session.js +++ b/src/network/Session.js @@ -193,10 +193,6 @@ class Session extends EventEmitter { trickle: true, config: { iceServers: this._iceServers }, }); - // if (initiator) { - // connection.createDataChannel("map", { iceServers: this._iceServers }); - // connection.createDataChannel("token", { iceServers: this._iceServers }); - // } const peer = { id, connection, initiator, ready: false }; function sendPeer(id, data, channel) {