Reset c.sc after calling onclose.
The onclose callback might want to access c.sc.
This commit is contained in:
+2
-1
@@ -1216,10 +1216,11 @@ Stream.prototype.close = function(replace) {
|
|||||||
let changed = recomputeUserStreams(c.sc, userid);
|
let changed = recomputeUserStreams(c.sc, userid);
|
||||||
if(changed && c.sc.onuser)
|
if(changed && c.sc.onuser)
|
||||||
c.sc.onuser.call(c.sc, userid, "change");
|
c.sc.onuser.call(c.sc, userid, "change");
|
||||||
c.sc = null;
|
|
||||||
|
|
||||||
if(c.onclose)
|
if(c.onclose)
|
||||||
c.onclose.call(c, replace);
|
c.onclose.call(c, replace);
|
||||||
|
|
||||||
|
c.sc = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user