mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed multiplying viewers from same computer
This commit is contained in:
@@ -334,10 +334,13 @@ io.on('connection', function(socket){
|
|||||||
if(in_list)
|
if(in_list)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if(contains(lists[coll], guid))
|
||||||
{
|
{
|
||||||
var index = lists[coll].indexOf(guid);
|
var index = lists[coll].indexOf(guid);
|
||||||
lists[coll].splice(index, 1);
|
lists[coll].splice(index, 1);
|
||||||
io.sockets.emit(coll+",viewers", lists[coll].length);
|
io.sockets.emit(coll+",viewers", lists[coll].length);
|
||||||
|
}
|
||||||
}catch(err){}
|
}catch(err){}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user