took wss
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
function sendMessageSocket (data) {
|
||||
if (chatSocket && chatSocket.readyState !== 0) {
|
||||
if (chatSocket.readyState !== 1 && chatSocket.readyState !== 0){
|
||||
init_ws()
|
||||
}
|
||||
@@ -12,6 +13,9 @@ function sendMessageSocket (data) {
|
||||
el_tab.querySelector(".last-message-messenger-user-tab").innerHTML = data['text']
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('Websoket connection failed')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user