Faster WebSocket reconnects
This commit is contained in:
parent
3cac4a19e1
commit
17e6ec468e
25 changed files with 940 additions and 677 deletions
9
main.js
9
main.js
|
@ -123,6 +123,7 @@ const {
|
|||
} = require('./ts/types/Settings');
|
||||
const { Environment } = require('./ts/environment');
|
||||
const { ChallengeMainHandler } = require('./ts/main/challengeMain');
|
||||
const { PowerChannel } = require('./ts/main/powerChannel');
|
||||
const { maybeParseUrl, setUrlSearchParams } = require('./ts/util/url');
|
||||
|
||||
const sql = new MainSQL();
|
||||
|
@ -1265,6 +1266,14 @@ app.on('ready', async () => {
|
|||
cleanupOrphanedAttachments,
|
||||
});
|
||||
sqlChannels.initialize(sql);
|
||||
PowerChannel.initialize({
|
||||
send(event) {
|
||||
if (!mainWindow) {
|
||||
return;
|
||||
}
|
||||
mainWindow.webContents.send(event);
|
||||
},
|
||||
});
|
||||
|
||||
// Run window preloading in parallel with database initialization.
|
||||
await createWindow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue