WIP
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export async function watcherLoop(
|
||||
import {ServiceState} from "./types/state";
|
||||
|
||||
export function watcherLoop(
|
||||
connect: () => Promise<void>,
|
||||
onConnectionClosed: () => Promise<void>,
|
||||
reconnectionDelays: number[],
|
||||
@@ -7,8 +9,9 @@ export async function watcherLoop(
|
||||
onRestart: () => Promise<void>,
|
||||
onRestartSuccess: () => Promise<void>,
|
||||
onError: (e: Error) => Promise<void>,
|
||||
) {
|
||||
): ServiceState {
|
||||
|
||||
let state: ServiceState = { state: 'INIT' }
|
||||
let hasStarted = false
|
||||
|
||||
;(async () => {
|
||||
|
||||
Reference in New Issue
Block a user