From 8acfb566c2964841a57863811ee50fdc696d5b2b Mon Sep 17 00:00:00 2001 From: darqs Date: Tue, 18 Jun 2019 23:09:33 +0200 Subject: [PATCH] Fix problem with connection.onClose callback --- TimeSync.server.js | 4 ++-- package.js | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TimeSync.server.js b/TimeSync.server.js index b7662a7..04a48e3 100644 --- a/TimeSync.server.js +++ b/TimeSync.server.js @@ -32,11 +32,11 @@ class TimeSyncCore { this.syncNow(connection.id); }, this.options.initialSyncDelay); - connection.onClose = () => { + connection.onClose(() => { if (connection.id in this.sessions) { delete this.sessions[connection.id]; } - }; + }); }); this.syncInterval = Meteor.setInterval(() => { diff --git a/package.js b/package.js index 981b41c..42ccd28 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'omega:time-sync', - version: '0.1.3', + version: '0.1.4', summary: 'NTP style automatic server-client time synchronization', git: 'https://github.com/wojtkowiak/meteor-time-sync', documentation: 'README.md' diff --git a/package.json b/package.json index 7117090..f8ff610 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meteor-time-sync", - "version": "0.1.3", + "version": "0.1.4", "scripts": { "release": "meteor publish --release=METEOR@1.5.2.2" }