Commit cc2ed144 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reset c.sc after calling onclose.

The onclose callback might want to access c.sc.
parent 892a4b84
......@@ -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;
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment