diff --git a/src/components/base/Box/index.js b/src/components/base/Box/index.js index 3ee3f85d..956e6c43 100644 --- a/src/components/base/Box/index.js +++ b/src/components/base/Box/index.js @@ -77,12 +77,6 @@ Card.defaultProps = { title: undefined, } -export const GrowScroll = (props: *) => ( - - - -) - type TabbableState = { isFocused: boolean, } diff --git a/src/main/bridge.js b/src/main/bridge.js index f28fcc95..14286441 100644 --- a/src/main/bridge.js +++ b/src/main/bridge.js @@ -7,6 +7,12 @@ import { resolve } from 'path' import setupAutoUpdater, { quitAndInstall } from './autoUpdate' +const processes = [] + +function cleanProcesses() { + processes.forEach(kill => kill()) +} + function onForkChannel(forkType, callType) { return (event: any, payload) => { const { type, data } = payload @@ -24,6 +30,8 @@ function onForkChannel(forkType, callType) { } } + processes.push(kill) + const onMessage = payload => { const { type, data, options = {} } = payload if (callType === 'async') { @@ -48,6 +56,8 @@ function onForkChannel(forkType, callType) { ipcMain.on('usb', onForkChannel('usb', 'async')) ipcMain.on('accounts', onForkChannel('accounts', 'async')) +ipcMain.on('clean-processes', cleanProcesses) + const handlers = { updater: { init: setupAutoUpdater, diff --git a/src/renderer/events.js b/src/renderer/events.js index a90b4310..3fc3c3fb 100644 --- a/src/renderer/events.js +++ b/src/renderer/events.js @@ -120,6 +120,9 @@ export default ({ store, locked }: { store: Object, locked: boolean }) => { handler(data) }) + // Ensure all sub-processes are killed before creating new ones (dev mode...) + ipcRenderer.send('clean-processes') + // Start detection when we plug/unplug devices sendEvent('usb', 'devices.listen')