From 9574de752d750f8de5e036215e1f08b617ad1cc4 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 1 Jul 2015 14:45:39 -0400 Subject: [PATCH] Debugging for #783 --- chrome/content/zotero/xpcom/ipc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/ipc.js b/chrome/content/zotero/xpcom/ipc.js index 7ceff05f4..23fe6a458 100755 --- a/chrome/content/zotero/xpcom/ipc.js +++ b/chrome/content/zotero/xpcom/ipc.js @@ -260,11 +260,12 @@ Zotero.IPC = new function() { instancePipeOpen = true; } - // Try to write to the pipe once a ms for 100 ms - var timeout = Date.now()+100, wroteToPipe; + // Try to write to the pipe once a ms for 1000 ms + var timeout = Date.now()+1000, wroteToPipe; do { wroteToPipe = Zotero.IPC.safePipeWrite(pipe, msg+"\n"); } while(Date.now() < timeout && !wroteToPipe); + if (wroteToPipe) Zotero.debug('IPC: Pipe took '+(Date.now()-(timeout-1000))+' ms to become available'); success = success || wroteToPipe; defunct = !wroteToPipe; }