mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Remove remote instance from map when disconnecting
This commit is contained in:
@@ -85,7 +85,10 @@ messaging.on("message", (message: Message) => {
|
||||
});
|
||||
|
||||
if (shouldWatchStatus) {
|
||||
remotes.get(deviceId)?.disconnect();
|
||||
if (remotes.has(deviceId)) {
|
||||
remotes.get(deviceId)?.disconnect();
|
||||
remotes.delete(deviceId);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user