From 926b41cc8936a2a8397daedff7795d97430f77b4 Mon Sep 17 00:00:00 2001 From: "Rodolfo M. Raya" Date: Sun, 24 Oct 2021 10:51:02 -0300 Subject: [PATCH] cleared session cache --- ts/App.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/App.ts b/ts/App.ts index 4bc649c..1a2b28a 100644 --- a/ts/App.ts +++ b/ts/App.ts @@ -11,7 +11,7 @@ *******************************************************************************/ import { execFileSync, spawn, ChildProcessWithoutNullStreams } from "child_process"; -import { app, clipboard, BrowserWindow, dialog, ipcMain, Menu, MenuItem, shell, nativeTheme, Rectangle, IpcMainEvent, screen, Size, net, ClientRequest } from "electron"; +import { app, clipboard, BrowserWindow, dialog, ipcMain, Menu, MenuItem, shell, nativeTheme, Rectangle, IpcMainEvent, screen, Size, net, ClientRequest, session } from "electron"; import { existsSync, mkdirSync, readFile, readFileSync, writeFileSync, lstatSync } from "fs"; import { Locations, Point } from "./locations"; import { IncomingMessage } from "electron/main"; @@ -2149,7 +2149,8 @@ class Swordfish { } static checkUpdates(silent: boolean): void { - let request = net.request('https://maxprograms.com/swordfish.json'); + session.defaultSession.clearCache(); + let request: Electron.ClientRequest = net.request({ url: 'https://maxprograms.com/swordfish.json', session: session.defaultSession }); request.on('response', (response: IncomingMessage) => { let responseData: string = ''; response.on('data', (chunk: Buffer) => {