Misskey streaming leak

This commit is contained in:
Cutls 2019-07-09 00:27:18 +09:00
parent 0e9bdef9ca
commit 2de05b84aa
2 changed files with 8 additions and 4 deletions

View File

@ -979,7 +979,7 @@ function goGoogle(id) {
}
var misskeyws = []
var misskeywsstate = []
function connectMisskey(acct_id) {
function connectMisskey(acct_id, re) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "wss://" + domain +
@ -1063,13 +1063,17 @@ function connectMisskey(acct_id) {
console.error("Error closing " + tlid);
console.error(error);
misskeywsstate[wsid] = false
connectMisskey(acct_id)
if(!re){
connectMisskey(acct_id, true)
}
return false;
};
misskeyws[wsid].onclose = function () {
console.warn("Closing " + tlid);
misskeywsstate[wsid] = false
connectMisskey(acct_id)
if(!re){
connectMisskey(acct_id, true)
}
return false;
};

View File

@ -55,7 +55,7 @@ function parseColumn(dontclose) {
var domain = localStorage.getItem("domain_" + key);
if (localStorage.getItem("mode_" + domain) == "misskey") {
localStorage.removeItem("misskey_wss_" + key)
connectMisskey(key)
connectMisskey(key, false)
}
});
}