Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
23dccae01b | |||
d5f8d215a2 | |||
3d4f8d1bbe | |||
4724629efa |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiglobal/typedserver",
|
||||
"version": "2.0.50",
|
||||
"version": "2.0.52",
|
||||
"description": "easy serving of static files",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiglobal/typedserver',
|
||||
version: '2.0.50',
|
||||
version: '2.0.52',
|
||||
description: 'easy serving of static files'
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ export class TypedServer {
|
||||
*/
|
||||
public async reload() {
|
||||
this.lastReload = Date.now();
|
||||
for (const connectionArg of await this.typedsocket.findAllTargetConnectionsByTag('typedserver_frontend') {
|
||||
for (const connectionArg of await this.typedsocket.findAllTargetConnectionsByTag('typedserver_frontend')) {
|
||||
const pushTime =
|
||||
this.typedsocket.createTypedRequest<interfaces.IReq_PushLatestServerChangeTime>(
|
||||
'pushLatestServerChangeTime',
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiglobal/typedserver',
|
||||
version: '2.0.50',
|
||||
version: '2.0.52',
|
||||
description: 'easy serving of static files'
|
||||
}
|
||||
|
@ -61,7 +61,8 @@ export class ReloadChecker {
|
||||
|
||||
public async checkReload(lastServerChange: number) {
|
||||
let reloadJustified = false;
|
||||
(await this.store.get(this.storeKey)) !== lastServerChange ? (reloadJustified = true) : null;
|
||||
let storedLastServerChange = await this.store.get(this.storeKey);
|
||||
storedLastServerChange && storedLastServerChange !== lastServerChange ? (reloadJustified = true) : null;
|
||||
|
||||
if (reloadJustified) {
|
||||
this.store.set(this.storeKey, lastServerChange);
|
||||
|
Reference in New Issue
Block a user