mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
rolled back some changes to stabilize WebRTC connections
This commit is contained in:
parent
616f6a6799
commit
1eba7359d1
5 changed files with 61 additions and 38 deletions
3
index.js
3
index.js
|
@ -105,7 +105,6 @@ class PairDropServer {
|
|||
this._joinRoom(peer);
|
||||
peer.socket.on('message', message => this._onMessage(peer, message));
|
||||
peer.socket.onerror = e => console.error(e);
|
||||
peer.socket.onclose = _ => this._onDisconnect(peer);
|
||||
this._keepAlive(peer);
|
||||
|
||||
// send displayName
|
||||
|
@ -409,7 +408,7 @@ class PairDropServer {
|
|||
|
||||
_keepAlive(peer) {
|
||||
this._cancelKeepAlive(peer);
|
||||
let timeout = 30000;
|
||||
let timeout = 500;
|
||||
if (!peer.lastBeat) {
|
||||
peer.lastBeat = Date.now();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue