diff --git a/ota.go b/ota.go index 62273732..cd80c9e1 100644 --- a/ota.go +++ b/ota.go @@ -261,7 +261,9 @@ func verifyFile(path string, expectedHash string, verifyProgress *float32, scope } // close the file so we can rename below - fileToHash.Close() + if err := fileToHash.Close(); err != nil { + return fmt.Errorf("error closing file: %w", err) + } hashSum := hex.EncodeToString(hash.Sum(nil)) scopedLogger.Info().Str("path", path).Str("hash", hashSum).Msg("SHA256 hash of") diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index 85e3c729..7a937160 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -218,7 +218,7 @@ export default function KvmIdRoute() { const ignoreOffer = useRef(false); const isSettingRemoteAnswerPending = useRef(false); const makingOffer = useRef(false); - const reconnectAttemptsRef = useRef(20); + const reconnectAttemptsRef = useRef(2000); const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:"; @@ -589,7 +589,7 @@ export default function KvmIdRoute() { api.POST(`${CLOUD_API}/webrtc/turn_activity`, { bytesReceived: bytesReceivedDelta, bytesSent: bytesSentDelta, - }).catch(()=>{ + }).catch(() => { // we don't care about errors here, but we don't want unhandled promise rejections }); }, 10000);