1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 08:35:57 +01:00

Reset c.sc after calling onclose.

The onclose callback might want to access c.sc.
This commit is contained in:
Juliusz Chroboczek 2023-08-29 01:42:48 +02:00
parent 892a4b8401
commit cc2ed14484

View file

@ -1216,10 +1216,11 @@ Stream.prototype.close = function(replace) {
let changed = recomputeUserStreams(c.sc, userid);
if(changed && c.sc.onuser)
c.sc.onuser.call(c.sc, userid, "change");
c.sc = null;
if(c.onclose)
c.onclose.call(c, replace);
c.sc = null;
};
/**