Skip to content

Commit 00572a2

Browse files
committed
fix: autoclose node
1 parent 8a11de4 commit 00572a2

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main/core/ipfs/node/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ const KILL_TIMEOUT = 15 * 1000
1919
const DEFAULT_SWARM_TCP = 4010
2020
const DEFAULT_SWARM_WS = 4011
2121
const resolveIpfsPaths = () => require('go-ipfs').path()
22-
.replace('app.asar', 'app.asar.unpacked');
22+
.replace('app.asar', 'app.asar.unpacked')
2323

2424
const forceKill = async (isInstance) => {
2525
log.info('Forcing stop')
2626
await isInstance.stop()
2727
log.warn('Cleaning bad repo')
2828
await removeFiles(ROOT_IPFS_DIR)
29-
};
29+
}
3030

3131
const initIpfsNode = async (isInstance) => {
3232
// Check if running time dir exists
@@ -44,7 +44,7 @@ const initIpfsNode = async (isInstance) => {
4444
const ipfsFactory = async (conf = {}) => {
4545
const keyFile = key.readFromStorage() || {}
4646
const node = 'node' in keyFile && keyFile.node ? keyFile.node : null
47-
47+
4848
// Link to current local node
4949
if (node) {
5050
log.info('Using provided node on port:', node)
@@ -111,7 +111,6 @@ const ipfsFactory = async (conf = {}) => {
111111
return false
112112
}
113113

114-
115114
const ipfsApi = isInstance?.api
116115
const id = ipfsApi.peerId
117116
log.info(`Started ${isInstance.started}`)

src/render/core/settings.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
// import { Key as key } from '@main/bridge'
66

7-
87
export default {
98
streaming: ['hls'],
109
gateways: () => {
1110
// const keyFile = key.readFromStorage() || {}
1211
// const node = 'node' in keyFile && keyFile.node ? keyFile.node : null
13-
const port = '9090'//null ? '8080' : '9090'
12+
const port = '9090'// null ? '8080' : '9090'
1413

1514
return [
1615
// 'https://vps1.phillm.net',
@@ -30,15 +29,15 @@ export default {
3029
spanish: 'es',
3130
english: 'en'
3231
},
33-
get revHash() {
32+
get revHash () {
3433
const v = Object.values(this.hash)
3534
const k = Object.keys(this.hash)
3635
return v.reduce((o, i, index) => {
3736
o[i] = k[index]
3837
return o
3938
}, {})
4039
},
41-
get available() {
40+
get available () {
4241
return Object.keys(this.hash)
4342
}
4443
},

0 commit comments

Comments
 (0)