Debugging for #783
This commit is contained in:
parent
7ccc48b4ae
commit
9574de752d
|
@ -260,11 +260,12 @@ Zotero.IPC = new function() {
|
||||||
instancePipeOpen = true;
|
instancePipeOpen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to write to the pipe once a ms for 100 ms
|
// Try to write to the pipe once a ms for 1000 ms
|
||||||
var timeout = Date.now()+100, wroteToPipe;
|
var timeout = Date.now()+1000, wroteToPipe;
|
||||||
do {
|
do {
|
||||||
wroteToPipe = Zotero.IPC.safePipeWrite(pipe, msg+"\n");
|
wroteToPipe = Zotero.IPC.safePipeWrite(pipe, msg+"\n");
|
||||||
} while(Date.now() < timeout && !wroteToPipe);
|
} while(Date.now() < timeout && !wroteToPipe);
|
||||||
|
if (wroteToPipe) Zotero.debug('IPC: Pipe took '+(Date.now()-(timeout-1000))+' ms to become available');
|
||||||
success = success || wroteToPipe;
|
success = success || wroteToPipe;
|
||||||
defunct = !wroteToPipe;
|
defunct = !wroteToPipe;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user