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;