From 34208f92f7d1a3ee2fc29c35cd33f88a06c3c638 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 26 May 2016 22:44:22 -0400 Subject: [PATCH] Fix startup error in translation-server --- chrome/content/zotero/xpcom/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js index 034832c14..6d083383b 100755 --- a/chrome/content/zotero/xpcom/server.js +++ b/chrome/content/zotero/xpcom/server.js @@ -62,8 +62,12 @@ Zotero.Server = new function() { Zotero.debug("HTTP server listening on "+(bindAllAddr ? "*": " 127.0.0.1")+":"+serv.port); - Zotero.addShutdownListener(this.close.bind(this)); + // Close port on Zotero shutdown (doesn't apply to translation-server) + if (Zotero.addShutdownListener) { + Zotero.addShutdownListener(this.close.bind(this)); + } } catch(e) { + Zotero.logError(e); Zotero.debug("Not initializing HTTP server"); serv = undefined; }