Skip to content

Commit

Permalink
Update tests for Automator
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewett-ks committed Aug 15, 2023
1 parent b9a811c commit 3af101c
Show file tree
Hide file tree
Showing 8 changed files with 13,349 additions and 4,197 deletions.
7,147 changes: 7,120 additions & 27 deletions keeperapi/package-lock.json

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions keeperapi/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,23 @@ export class SocketListener {
})

this.socket.onClose(async (event: Event & {reason:string, code:number}) => {
console.log('socket closed because: ', event)
console.log('socket closed because: ', event.code)

let reason
this.isConnected = false

try{
reason = JSON.parse(event.reason)
} catch(error){
console.log('No close reason. Error message is: ', error)
if (event.reason && (event.reason.length > 0)) {
try{
reason = JSON.parse(event.reason)
} catch(error) {
console.log('No close reason. Error message is: ', error)

if (!this.isClosedByClient) {
this.reconnect()
}
if (!this.isClosedByClient) {
this.reconnect()
}

return
return
}
}

switch (event.code){
Expand Down
2,078 changes: 1,812 additions & 266 deletions keeperapi/src/proto.d.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 3af101c

Please sign in to comment.