Fix race condition related to watching DGL games.

It's possible for a dgamelaunch game to end and cause rlgwebd to stop watching
it before rlgwebd has started watching it.
This commit is contained in:
John "Elwin" Edwards 2020-08-16 20:56:18 -04:00
parent c38fb5d107
commit 29f17aa874

View file

@ -418,6 +418,8 @@ DglSession.prototype.notifier = function (ev, finame) {
};
DglSession.prototype.close = function () {
/* The watcher might not be open yet. */
if ("recwatcher" in this)
this.recwatcher.close();
/* Ensure all data is handled before quitting. */
this.startchunk();