mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix websocket timing
This commit is contained in:
parent
72fa4f12d9
commit
409993a8ee
1 changed files with 15 additions and 2 deletions
|
|
@ -137,9 +137,22 @@ public class ZeppelinClient {
|
|||
new Timer().schedule(new java.util.TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
watcherSession = openWatcherSession();
|
||||
int time = 0;
|
||||
while (time < 5 * MIN) {
|
||||
watcherSession = openWatcherSession();
|
||||
if (watcherSession == null) {
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
time += 5;
|
||||
} catch (InterruptedException e) {
|
||||
//continue
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 10000);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue