snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit 984d1e75ecd62d769536a89127fa5dcfff8325b2
parent 2c1611686885715551f35ccb622bf42fc1bb4c48
Author: PaulSzymanski <519954+PaulSzymanski@users.noreply.github.com>
Date:   Tue, 24 Mar 2020 15:23:20 +0100

Less logging

Diffstat:
Mserver/index.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/index.js b/server/index.js @@ -105,10 +105,10 @@ class SnapdropServer { } _send(peer, message) { - if (!peer) return console.error('undefined peer'); - if (this._wss.readyState !== this._wss.OPEN) return console.error('Socket is closed'); + if (!peer) return; + if (this._wss.readyState !== this._wss.OPEN) return; message = JSON.stringify(message); - peer.socket.send(message, error => error ? console.log(error): ''); + peer.socket.send(message, error => ''); } _keepAlive(peer) {