Closed
Description
Electron app. Trying to start ipfs daemon in a renderer process with this piece of code:
const factory = IPFSFactory.create({ type: "go" })
const startDaemon = (ipfsd) => {
ipfsd.start(daemonFlags, (err, api) => {
if (err) {
reject(err)
}
resolve(api)
})
}
factory.spawn({ disposable: false, repoPath: '/my/repo/path/' }, (err, ipfsd) => {
if (err) {
reject(err)
}
if (ipfsd.initialized) {
startDaemon(ipfsd)
} else {
ipfsd.init((err) => {
if (err) {
resolve(err)
}
startDaemon(ipfsd)
})
}
})
If repo doesn't exists it works as expected: new repo get initialized, daemon starts, I can see it in my processes list and in subprocess
field of ipfsd
. But the next time demon does not start, despite the fact that initialized
and _started
fields are all true. No errors, subprocess
field is null. Am I missing something?