Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbv committed Jun 5, 2021
1 parent 542dc78 commit 217da79
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/html/comps/pass-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const PassInputComp = Vue.component('pass-input', {

methods:{
fire(){
hideDimmer()
this.Modal.close()
this.Modal.open()
},

Expand Down
1 change: 0 additions & 1 deletion src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@

// check if daemon is started
if(await api.send('daemonIsStarted', null, 500)) {
console.log('meme')
this.appsArePublished = true
this.getApps()
return
Expand Down
7 changes: 5 additions & 2 deletions src/ipc-events/start-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = (ipcMain, mainWindow)=>{

if (str.includes('OK') && prevLog.includes('Starting websocket RPC server')){
WSConn.startWS(wsToken, mainWindow)

WSConn.get().on('open', ()=>{
mainWindow.webContents.send("startDaemon_RES", true)
})
Expand All @@ -76,15 +77,17 @@ module.exports = (ipcMain, mainWindow)=>{

if( str.includes("Apps broadcasted")) mainWindow.webContents.send("daemon_appsBroadcasted", true)

if( str.includes('panic:')) mainWindow.webContents.send("daemon_ERROR", str)
if( (str.includes('panic:') || str.includes("FAIL")) &&
!str.includes('cipher: message authentication failed'))
mainWindow.webContents.send("daemon_ERROR", str)

prevLog = data.toString()

// avoids 'object has been destroyed error'
if(!mainWindow.isDestroyed())
mainWindow.webContents.send("stdLog", data.toString())

//console.log(data.toString())
console.log(data.toString())
})
})
}
10 changes: 7 additions & 3 deletions src/wsconn/wsconn.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ const Conn = {
if(this._instance) return

// connect
this._instance = new WS("ws://127.0.0.1:50750", {
headers: { Authorization: `Bearer ${wsToken}`},
})
try {
this._instance = new WS("ws://127.0.0.1:50750", {
headers: { Authorization: `Bearer ${wsToken}`},
})
} catch(e) {
console.log(e)
}

// events
//
Expand Down

0 comments on commit 217da79

Please sign in to comment.