Fix issue server-core not cleaning up devices properly

Summary:
Notice during debugging that devices keep unregistering. Doesn't lead to any practical issues, but still incorrect.

Also noticed that the server didn't restart when changing flipper-server-core, or recompile its deps, so fixed that as well.

Reviewed By: passy

Differential Revision: D32644276

fbshipit-source-id: 5384a30c9d293acda04b6e6f940268ddcd65a870
This commit is contained in:
Michel Weststrate
2021-12-08 04:25:28 -08:00
committed by Facebook GitHub Bot
parent 5d45bd741b
commit 9c913151bc
2 changed files with 2 additions and 1 deletions

View File

@@ -275,6 +275,7 @@ export class FlipperServerImpl implements FlipperServer {
if (!device) {
return;
}
this.devices.delete(serial);
device.disconnect(); // we'll only destroy upon replacement
this.emit('device-disconnected', device.info);
}