peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.48k stars 1.43k forks source link

Peer Losing Connection to Peer Server in Chrome #350

Closed zoomedout closed 5 years ago

zoomedout commented 8 years ago

The peer keeps losing connection to the peer server every 1-2minutes in Chrome latest version and sometimes in Firefox. Re-connecting fails as the server is getting destroyed

lemurio commented 8 years ago

Maybe server process died? Try to start with forever npm install forever -g npm install forever-monitor Then forever start server.js

zoomedout commented 8 years ago

@lemurio No thats not the problem. Its even happening with the default cloud based one

madwed commented 7 years ago

Did you ever figure this out @arjunmitrareddy? I'm having the same problem

madwed commented 7 years ago

Could this be related to https://github.com/peers/peerjs/issues/291?

madwed commented 7 years ago

Update: tried that fix, but it didn't solve the issue

dannysofftie commented 7 years ago

A quick fix to this..... when starting Node, don't use nodemon. Use npm start if you have configured it in your package.json file, or simply use node server.js(server.js is your server script). I ran into the same problems then I realised nodemon restarts the server every time a websocket makes a request and thus you get disconnected as the connection is lost

afrokick commented 5 years ago

I think 'heartbeat' will fix it. It's in master already, but not released. You can try it.

RamyaAshika commented 5 years ago

Can you please do that as soon as possible because I'm using your peerjs version 3.20 @afrokick

afrokick commented 5 years ago

@RamyaAshika you can try our 'beta' version from master - npm install peers/peerjs#master

RamyaAshika commented 5 years ago

Sure, Thank you. @afrokick