1
0
mirror of https://github.com/RobinLinus/snapdrop.git synced 2025-05-16 15:40:10 -07:00

Less logging

This commit is contained in:
PaulSzymanski 2020-03-24 15:23:20 +01:00
parent 2c16116868
commit 984d1e75ec

View File

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