Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Removing .pid pipe, falling back to spawned process pid
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanml committed Aug 15, 2018
1 parent 9a22ba4 commit 7bc2bb3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/ethWallet-geth.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const isWindows = process.platform === 'win32'
const gethProcessKey = isWindows ? 'geth.exe' : 'geth'

const ipcPath = isWindows ? '\\\\.\\pipe\\geth.ipc' : path.join(gethDataDir, 'geth.ipc')
const pidPath = isWindows ? '\\\\.\\pipe\\geth.pid' : path.join(gethDataDir, 'geth.pid')
const pidPath = path.join(gethDataDir, 'geth.pid')
const pwPath = path.join(gethDataDir, 'wallets.pw')
const gethProcessPath = path.join(getExtensionsPath('bin'), gethProcessKey)

Expand Down Expand Up @@ -185,9 +185,12 @@ const cleanupGethAndExit = (exitCode) => {
}

const cleanupGeth = (processId) => {
processId = processId || gethProcessId
processId = (
(processId || gethProcessId) ||
(geth && geth.pid)
)

if (!processId) return console.warn('GET: nothing to cleanup')
if (!processId) return console.warn('GETH: nothing to cleanup')

// Set geth to null to remove bound listeners
// Otherwise, geth will attempt to restart itself
Expand Down

0 comments on commit 7bc2bb3

Please sign in to comment.