mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Added timeout to wait.
This commit is contained in:
parent
ccf17f9867
commit
38cf9e33c6
2 changed files with 4 additions and 1 deletions
|
@ -67,6 +67,7 @@ public class WLDirectoryNodeSnapshot implements CandidateSnapshot {
|
|||
|
||||
@Override
|
||||
public void approveWithVersionID(int versionID) {
|
||||
System.out.println("approve with version " + versionID);
|
||||
callback.approveSnapshot(versionID, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,11 +57,13 @@ public class WriteLatexAPI implements WriteLatexDataSource {
|
|||
public void expectPostback(String projectName) {
|
||||
Object value = new Object();
|
||||
postbackConds.put(projectName, value);
|
||||
System.out.println("sleeping");
|
||||
try {
|
||||
value.wait();
|
||||
value.wait(5000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("finished sleep");
|
||||
}
|
||||
|
||||
/* Called by postback thread. */
|
||||
|
|
Loading…
Reference in a new issue