Skip to content

Commit

Permalink
Some client app bug fixes (#3871)
Browse files Browse the repository at this point in the history
* linted

* delete accidental files
  • Loading branch information
Ming authored Sep 13, 2021
1 parent 9f61729 commit 3343f0f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 3 additions & 9 deletions client-applications/src/main/flows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ const update = autoUpdateFlow(fromTrigger("updateAvailable"))

// If there's no update, get the auth credentials (access/refresh token)
const auth = authFlow(
fromSignal(
merge(
fromSignal(fromTrigger("authInfo"), fromTrigger(TRIGGER.notPersisted)),
fromTrigger(TRIGGER.persisted)
),
merge(
fromTrigger(TRIGGER.updateNotAvailable),
fromTrigger(TRIGGER.updateError)
)
merge(
fromSignal(fromTrigger("authInfo"), fromTrigger(TRIGGER.notPersisted)),
fromTrigger(TRIGGER.persisted)
)
)

Expand Down
2 changes: 1 addition & 1 deletion client-applications/src/utils/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { spawn, ChildProcess } from "child_process"
import config, { loggingFiles } from "@app/config/environment"
import { electronLogPath, protocolToLogz } from "@app/utils/logging"

const NACK_LOOKBACK_PERIOD = 3 // Number of seconds to look back when measuring # of nacks
const NACK_LOOKBACK_PERIOD = 2 // Number of seconds to look back when measuring # of nacks
const MAX_NACKS_ALLOWED = 6 // Maximum # of nacks allowed before we decide the network is unstable
let protocolConnected = false

Expand Down
6 changes: 5 additions & 1 deletion client-applications/src/utils/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ export const getNumberWindows = () => {
export const closeElectronWindows = (windows?: BrowserWindow[]) => {
const windowsToClose = windows ?? getElectronWindows()
windowsToClose.forEach((win: BrowserWindow) => {
win.close()
try {
win.close()
} catch (err) {
console.error(err)
}
})
}

Expand Down

0 comments on commit 3343f0f

Please sign in to comment.