From 29f17aa874d0ea3343928897695859b5dadf7f07 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sun, 16 Aug 2020 20:56:18 -0400 Subject: [PATCH] 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. --- rlgwebd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rlgwebd b/rlgwebd index 3d7a944..855caa8 100755 --- a/rlgwebd +++ b/rlgwebd @@ -418,7 +418,9 @@ DglSession.prototype.notifier = function (ev, finame) { }; DglSession.prototype.close = function () { - this.recwatcher.close(); + /* The watcher might not be open yet. */ + if ("recwatcher" in this) + this.recwatcher.close(); /* Ensure all data is handled before quitting. */ this.startchunk(); var connlist = this.watchers;