We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cd3c4d commit 8b82792Copy full SHA for 8b82792
src/js/serial_backend.js
@@ -30,7 +30,7 @@ import { ispConnected } from "./utils/connection";
30
const logHead = "[SERIAL-BACKEND]";
31
32
let mspHelper;
33
-let connectionTimestamp;
+let connectionTimestamp = null;
34
let liveDataRefreshTimerId = false;
35
36
let isConnected = false;
@@ -66,7 +66,8 @@ export function initializeSerialBackend() {
66
!["cli", "firmware_flasher"].includes(GUI.active_tab) &&
67
PortHandler.portPicker.autoConnect &&
68
!isCliOnlyMode() &&
69
- Date.now() - rebootTimestamp <= REBOOT_CONNECT_MAX_TIME_MS
+ (connectionTimestamp === null || connectionTimestamp > 0) ||
70
+ (Date.now() - rebootTimestamp <= REBOOT_CONNECT_MAX_TIME_MS)
71
) {
72
connectDisconnect();
73
}
0 commit comments