diff rlgwebd @ 213:08665c56c6a0 default tip

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.
author John "Elwin" Edwards
date Sun, 16 Aug 2020 20:56:18 -0400
parents e6af951def94
children
line wrap: on
line diff
--- 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;