diff options
author | 2019-11-29 01:03:19 +0700 | |
---|---|---|
committer | 2019-11-29 01:03:19 +0700 | |
commit | d764e6e29e19c50a4e285df41289774ec80a9bbb (patch) | |
tree | 13ab73ed87ef8d061382caa0499131568ae91dd2 /src/electron | |
parent | Update ref to latest recipes fixes (diff) | |
download | ferdium-app-d764e6e29e19c50a4e285df41289774ec80a9bbb.tar.gz ferdium-app-d764e6e29e19c50a4e285df41289774ec80a9bbb.tar.zst ferdium-app-d764e6e29e19c50a4e285df41289774ec80a9bbb.zip |
Rename server to internal-server to avoid confusion
Diffstat (limited to 'src/electron')
-rw-r--r-- | src/electron/ipc-api/localServer.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/electron/ipc-api/localServer.js b/src/electron/ipc-api/localServer.js index d12fb5708..9b800fdf6 100644 --- a/src/electron/ipc-api/localServer.js +++ b/src/electron/ipc-api/localServer.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcMain, app } from 'electron'; | 1 | import { ipcMain, app } from 'electron'; |
2 | import net from 'net'; | 2 | import net from 'net'; |
3 | import startServer from '../../server/start'; | 3 | import startServer from '../../internal-server/start'; |
4 | 4 | ||
5 | const DEFAULT_PORT = 45569; | 5 | const DEFAULT_PORT = 45569; |
6 | 6 | ||
@@ -31,15 +31,12 @@ export default (params) => { | |||
31 | let port = DEFAULT_PORT; | 31 | let port = DEFAULT_PORT; |
32 | (async () => { | 32 | (async () => { |
33 | // eslint-disable-next-line no-await-in-loop | 33 | // eslint-disable-next-line no-await-in-loop |
34 | while (await portInUse(port) && port < DEFAULT_PORT + 10) { | 34 | while ((await portInUse(port)) && port < DEFAULT_PORT + 10) { |
35 | port += 1; | 35 | port += 1; |
36 | } | 36 | } |
37 | console.log('Starting local server on port', port); | 37 | console.log('Starting local server on port', port); |
38 | 38 | ||
39 | startServer( | 39 | startServer(app.getPath('userData'), port); |
40 | app.getPath('userData'), | ||
41 | port, | ||
42 | ); | ||
43 | 40 | ||
44 | params.mainWindow.webContents.send('localServerPort', { | 41 | params.mainWindow.webContents.send('localServerPort', { |
45 | port, | 42 | port, |