(cause: Cause.Cause<never>)
| 298 | ) |
| 299 | |
| 300 | function onDefect(cause: Cause.Cause<never>): Effect.Effect<void> { |
| 301 | if (!activeServers.has(address.entityId)) { |
| 302 | return endLatch.open |
| 303 | } |
| 304 | const effect = writeRef.unsafeRebuild() |
| 305 | defectRequestIds = Array.from(activeRequests.keys()) |
| 306 | return Effect.logError("Defect in entity, restarting", cause).pipe( |
| 307 | Effect.andThen(Effect.ignore(retryDriver.next(void 0))), |
| 308 | Effect.flatMap(() => activeServers.has(address.entityId) ? effect : endLatch.open), |
| 309 | Effect.annotateLogs({ |
| 310 | module: "EntityManager", |
| 311 | address, |
| 312 | runner: options.runnerAddress |
| 313 | }), |
| 314 | Effect.catchAllCause(onDefect) |
| 315 | ) |
| 316 | } |
| 317 | |
| 318 | const state: EntityState = { |
| 319 | scope, |
no test coverage detected