mirror of
https://github.com/jetkvm/cloud-api.git
synced 2025-09-16 08:38:15 +00:00
fix: activeConnection is now a tuple, call conn[0] instead
This commit is contained in:
parent
a612f95706
commit
771e1488d4
@ -119,8 +119,9 @@ export const Delete = async (req: express.Request, res: express.Response) => {
|
||||
await prisma.device.delete({ where: { id, user: { googleId: sub } } });
|
||||
|
||||
// We just removed the device, so we should close any running open socket connections
|
||||
const socket = activeConnections.get(id);
|
||||
if (socket) {
|
||||
const conn = activeConnections.get(id);
|
||||
if (conn) {
|
||||
const [socket] = conn;
|
||||
socket.send("Deregistered from server");
|
||||
socket.close();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user