fix(macos): fix crashes under Mac OS X
This commit is contained in:
parent
585b683380
commit
45af9bddea
@ -295,8 +295,14 @@ const stop = () => {
|
|||||||
if(mainWindow)
|
if(mainWindow)
|
||||||
mainWindow.hide()
|
mainWindow.hide()
|
||||||
|
|
||||||
|
// bug with mac os tray closing
|
||||||
|
// https://github.com/electron/electron/issues/9982
|
||||||
|
// https://github.com/electron/electron/issues/13556
|
||||||
|
if(process.platform !== 'darwin')
|
||||||
|
{
|
||||||
if(tray)
|
if(tray)
|
||||||
tray.destroy()
|
tray.destroy()
|
||||||
|
}
|
||||||
|
|
||||||
if(spider)
|
if(spider)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ let config = {
|
|||||||
sphinx: {
|
sphinx: {
|
||||||
host : '127.0.0.1',
|
host : '127.0.0.1',
|
||||||
port : 9306,
|
port : 9306,
|
||||||
connectionLimit: 12
|
connectionLimit: 10
|
||||||
},
|
},
|
||||||
|
|
||||||
spider: {
|
spider: {
|
||||||
|
@ -23,7 +23,7 @@ module.exports = class Feed {
|
|||||||
config.feedDate = this.feedDate
|
config.feedDate = this.feedDate
|
||||||
await this.sphinx.query('delete from feed where id > 0')
|
await this.sphinx.query('delete from feed where id > 0')
|
||||||
let id = 0
|
let id = 0
|
||||||
return Promise.all(
|
await Promise.all(
|
||||||
this.feed.map(
|
this.feed.map(
|
||||||
async record => await this.sphinx.query('insert into feed(id, data) values(?, ?)', [++id, JSON.stringify(record)])
|
async record => await this.sphinx.query('insert into feed(id, data) values(?, ?)', [++id, JSON.stringify(record)])
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user