Skip to content

Commit

Permalink
Delete from _raspberry_pi_map after disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Mar 15, 2024
1 parent aa5c7a2 commit 7895693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/admin_panel/js/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class WebSocketServer {
if (this._wss === undefined) {
return;
}
this._raspberry_pi_map.delete(uuid);
global.mainWindow.webContents.send('onDisconnection', JSON.stringify({ uuid: uuid }));
});

Expand Down
2 changes: 1 addition & 1 deletion app/admin_panel/src/routes/Websocket.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<WebsocketServerConfig />
<hr />
<br />
<h1 class="text-gray-900 dark:text-white text-2xl font-bold">Raspberry Pi UUID List</h1>
<h1 class="text-gray-900 dark:text-white text-2xl font-bold mb-2">Raspberry Pi UUID List</h1>
{#each $raspberry_pi_uuid_list as uuid}
<Card>
<Button
Expand Down

0 comments on commit 7895693

Please sign in to comment.