# HG changeset patch # User John "Elwin" Edwards # Date 1597625778 14400 # Node ID 08665c56c6a0a5dfe467356da8e9fe7304adddaf # Parent e6af951def94cde9a64cb47585950c88453fb1ff 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. diff -r e6af951def94 -r 08665c56c6a0 rlgwebd --- a/rlgwebd Fri Apr 03 15:15:02 2020 -0400 +++ b/rlgwebd Sun Aug 16 20:56:18 2020 -0400 @@ -418,7 +418,9 @@ }; 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;