add sync cleanup method

This commit is contained in:
Ari Lazier 2016-10-25 15:04:58 -07:00
parent d76ec0934e
commit 0d74c05366
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,10 @@ module.exports = function(realmConstructor) {
if (realmConstructor.Sync) { if (realmConstructor.Sync) {
realmConstructor.Sync.User = require('./sync').User; realmConstructor.Sync.User = require('./sync').User;
realmConstructor.Sync.AuthError = require('./errors').AuthError; realmConstructor.Sync.AuthError = require('./errors').AuthError;
if (realmConstructor.Sync.cleanup) {
process.on('exit', () => realmConstructor.Sync.cleanup());
}
} }
// TODO: Remove this now useless object. // TODO: Remove this now useless object.

@ -1 +1 @@
Subproject commit f6d64f03c5fd4a1a78770455d5b3dc0f5d2c900d Subproject commit 543f9bc748e14b74ee280c50c7a85b74cabaaea5