1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-02 05:21:39 +02:00

Fix peer stream end

Terminate connection with the kicked peer, not the owner kicking it ;-)
This commit is contained in:
Daniel Berteaud 2014-05-18 20:03:42 +02:00
parent 299b3393e4
commit 7da38b5d2e

View File

@ -519,8 +519,8 @@ function initVroom(room) {
// Wait a bit for the peer to leave, but end connection if it's still here
// after 2 seconds
setTimeout(function(){
if (peers[data.id]){
peers[data.id].obj.end();
if (peers[data.payload.id]){
peers[data.payload.id].obj.end();
}
}, 2000);
}