remove user-message event listener on ta dismount
This commit is contained in:
parent
fd49d25696
commit
1b6f278620
2 changed files with 21 additions and 13 deletions
|
|
@ -8,10 +8,10 @@ wss.on("connection", function connection(ws, req) {
|
|||
ws.on("message", function incoming(message) {
|
||||
|
||||
console.log(message)
|
||||
if (message === 'no-token' || message === 'undefined') {
|
||||
console.log('no token to authenticate');
|
||||
ws.send('locked');
|
||||
}
|
||||
if (message === 'no-token' || message === 'undefined') {
|
||||
console.log('no token to authenticate');
|
||||
ws.send('success');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue