mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-07 14:53:38 +00:00
close sockets when device is deleted
this has been broken for awhile probably oops
This commit is contained in:
+7
-1
@@ -244,8 +244,14 @@ module.exports.deleteActive = function deleteActive() {
|
||||
);
|
||||
|
||||
if (choice) {
|
||||
if (device.plugin.connectionType === 'TCPsocket') {
|
||||
if (device.plugin.config.connectionType === 'TCPsocket') {
|
||||
device.connection.destroy();
|
||||
} else if (device.plugin.config.connectionType === 'UDPsocket') {
|
||||
device.connection.close();
|
||||
} else if (device.plugin.config.connectionType === 'multicast') {
|
||||
device.connection.close();
|
||||
} else if (device.plugin.config.connectionType.startsWith('osc')) {
|
||||
device.connection.close();
|
||||
}
|
||||
VIEW.removeDeviceFromList(device);
|
||||
delete devices[device.id];
|
||||
|
||||
Reference in New Issue
Block a user