peers / peerjs

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

Call.on('close') is few seconds delayed #605

Closed Vichp closed 2 years ago

Vichp commented 4 years ago

After I end the call, the call.on('close') method executes after a delay of a few seconds. This is on my localhost development environment. I tried using both the default STUN ICE server from the peerJS docs (stun.l.google.com:19302) AS well as my own STUN server that I've set up with coturn. Yet no difference and same delay, no matter what. Delay exists in both Chrome and Firefox.

I've also noticed that regardless of if I use my own stun server address or google's, the same ICE candidates ip address (92.84.33.39) appears with both cases - as can be seen in the picture below.

Screenshot 2019-12-10 at 16 10 04

What is causing the delay and how can it be fixed, any ideas? @kidandcat

(As a side note, DataConnection, that is sending and receiving messages/data between the two peers does not have any delay at all.)

Thanks in advance.

afrokick commented 2 years ago

Sorry, seems like a bug in the browsers, we can't fix it.