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:
committed by
Facebook GitHub Bot
parent
5d45bd741b
commit
9c913151bc
@@ -275,6 +275,7 @@ export class FlipperServerImpl implements FlipperServer {
|
|||||||
if (!device) {
|
if (!device) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.devices.delete(serial);
|
||||||
device.disconnect(); // we'll only destroy upon replacement
|
device.disconnect(); // we'll only destroy upon replacement
|
||||||
this.emit('device-disconnected', device.info);
|
this.emit('device-disconnected', device.info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"reset": "rimraf lib *.tsbuildinfo",
|
"reset": "rimraf lib *.tsbuildinfo",
|
||||||
"build": "tsc -b",
|
"build": "tsc -b",
|
||||||
"prepack": "yarn reset && yarn build",
|
"prepack": "yarn reset && yarn build",
|
||||||
"start": "cross-env NODE_ENV=development nodemon --watch './src/**/*.tsx' --watch '../flipper-server-core/src/**/*.tsx' --exec '../ts-node' src/index.tsx"
|
"start": "cross-env NODE_ENV=development nodemon --watch './src/**/*.tsx' --watch '../flipper-server-core/src/**/*.tsx' --exec 'yarn build && ../ts-node src/index.tsx'"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib/**/*"
|
"lib/**/*"
|
||||||
|
|||||||
Reference in New Issue
Block a user