Commit 3f4debfa authored by 曾思程's avatar 曾思程

isStopConnectionCheck为true时,停止触发连接事件。停止tryconecnt报错的异常抛出

parent a5e69e05
...@@ -109,7 +109,6 @@ function Jensen(log) { ...@@ -109,7 +109,6 @@ function Jensen(log) {
self.model = device.productId == 45069 ? 'hidock-h1e' : 'hidock-h1'; self.model = device.productId == 45069 ? 'hidock-h1e' : 'hidock-h1';
} catch (e) { } catch (e) {
Logger.error('jensen', 'setup', String(e)); Logger.error('jensen', 'setup', String(e));
throw e;
} }
if (!disableOnConnect) _check_conn_status(); if (!disableOnConnect) _check_conn_status();
current = null; current = null;
...@@ -117,7 +116,7 @@ function Jensen(log) { ...@@ -117,7 +116,7 @@ function Jensen(log) {
ready = true; ready = true;
Logger.debug('jensen', 'setup', 'setup webusb connection'); Logger.debug('jensen', 'setup', 'setup webusb connection');
try { try {
if (!disableOnConnect) self.onconnect?.(); if (!disableOnConnect && !this.isStopConnectionCheck) self.onconnect?.();
} catch (err) { } catch (err) {
Logger.error('jensen', 'setup', err); Logger.error('jensen', 'setup', err);
} }
......
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