Skip to content

Commit

Permalink
Close database connection opened in offline load. Issue #22
Browse files Browse the repository at this point in the history
Change-Id: Icfff8487d4e57fa5fa993506cfb1f3cff4723fe7
  • Loading branch information
natalieharris committed Mar 27, 2015
1 parent 6e6e8b4 commit b73e810
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/player/offline_video_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,17 @@ shaka.player.OfflineVideoSource.prototype.load = function(preferredLanguage) {
var baseClassLoad = shaka.player.StreamVideoSource.prototype.load;
return baseClassLoad.call(this, preferredLanguage);
})
);
).then(
function() {
contentDatabase.closeDatabaseConnection();
return Promise.resolve();
}
).catch(
/** @param {Error} e */
function(e) {
contentDatabase.closeDatabaseConnection();
return Promise.reject(e);
});
};


Expand Down

0 comments on commit b73e810

Please sign in to comment.