Skip to content

Commit

Permalink
fix(transport): udp interface-change event
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlesisz committed Oct 11, 2024
1 parent 10e4695 commit e443c79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/transport/src/api/udp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ export class UdpApi extends AbstractApi {
}

private handleDevicesChange(devices: DescriptorApiLevel[]) {
const [known, unknown] = arrayPartition(devices, device => this.devices.includes(device));
const [known, unknown] = arrayPartition(
devices,
device => !!this.devices.find(d => d.path === device.path),
);

if (known.length !== this.devices.length || unknown.length > 0) {
this.devices = devices;
Expand Down

0 comments on commit e443c79

Please sign in to comment.