Commit af2f2fee by Kim Peace

Added retry for not found wc_api

parent 64d27dd6
...@@ -14,9 +14,15 @@ CoviewBridge.bindReadyEvent = function () { ...@@ -14,9 +14,15 @@ CoviewBridge.bindReadyEvent = function () {
}; };
CoviewBridge.bindFermiWebSocketOpenned = function () { CoviewBridge.bindFermiWebSocketOpenned = function () {
try {
wc_api.addEventListener("open", async function (event) { wc_api.addEventListener("open", async function (event) {
FermiWebSocketMessageHandler.bindWebSocketMessage(); FermiWebSocketMessageHandler.bindWebSocketMessage();
}); });
} catch (err) {
setTimeout(() => {
CoviewBridge.bindFermiWebSocketOpenned();
}, 1000);
}
}; };
CoviewBridge.bindStartEvent = function () { CoviewBridge.bindStartEvent = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment