supress websocket connecting errors
This commit is contained in:
parent
c33ff903f7
commit
0e1226c5be
@ -379,7 +379,6 @@ document.addEventListener("visibilitychange", function() {
|
||||
function switchChannel(channelname) {
|
||||
sessionStorage.setItem("lastdm", channelname);
|
||||
currentChannel = channelname
|
||||
socket.send(JSON.stringify({"id":"switchChannel","data":channelname}))
|
||||
|
||||
if(localStorage.getItem(currentChannel+"enc_key")!=null) {
|
||||
encryption_keys = localStorage.getItem(currentChannel+"enc_key")
|
||||
@ -387,6 +386,12 @@ function switchChannel(channelname) {
|
||||
} else {
|
||||
encryption_keys = ""
|
||||
}
|
||||
|
||||
try {
|
||||
socket.send(JSON.stringify({"id":"switchChannel","data":channelname}))
|
||||
} catch(err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
function removeDuplicates(a) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user