restart socket session on renderer logout
This commit is contained in:
parent
918b65f068
commit
61253f9cc2
6 changed files with 25 additions and 56 deletions
|
|
@ -9,12 +9,14 @@ wss.on("connection", function connection(ws, req) {
|
|||
|
||||
console.log(message)
|
||||
if (message === 'no-token' || message === 'undefined') {
|
||||
ws.send('success');
|
||||
} else if (message instanceof Buffer) {
|
||||
ws.send('locked');
|
||||
} else if (message instanceof String || typeof message === "string") {
|
||||
// audio message
|
||||
|
||||
console.log('caught the token', message)
|
||||
ws.send('success');
|
||||
} else {
|
||||
const parsed = JSON.parse(message);
|
||||
console.log('parsed', parsed)
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue