Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

merge zbaylite into master #155

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"homepage": "https://gitlab.rumblefishdev.com/holmes/zbay",
"@comment version": "To build new version for specific platform, just replace platform in version tag to one of following linux, mac, windows",
"version": "2.2.7-zbay-lite",
"version": "2.2.8-zbay-lite",
"description": "Distributed goods and bulletin board",
"main": "dist/main.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ app.on('ready', async () => {
mainWindow.webContents.send('ping')
try {
// Spawn and kill tor to generate onionAddress
console.log('spawning tor for onion address')
torProcess = await spawnTor()
createServer(mainWindow)
mainWindow.webContents.send('onionAddress', getOnionAddress())
torProcess.kill()
torProcess = null
console.log('killed tor process')
} catch (error) {
console.log(error)
}
Expand All @@ -277,7 +279,9 @@ app.on('ready', async () => {
})

ipcMain.on('spawnTor', async (event, arg) => {
console.log(`checking if tor process is not running and it is ${torProcess}`)
if (torProcess === null) {
console.log('spawning tor for application')
torProcess = await spawnTor()
}
})
Expand Down