commit 34208f92f7d1a3ee2fc29c35cd33f88a06c3c638 parent 9b41c8dd9708ab5396bbb591a8f3bd0af1c21bb7 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 26 May 2016 22:44:22 -0400 Fix startup error in translation-server Diffstat:
| M | 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 @@ -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; }