# fix\(server\): recover each heartbeat round rather than ending it on first error · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/88780e3ec24d4bbb98d1d53f58517695114970cd)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 88780e3ec24d4bbb98d1d53f58517695114970cd

Requested commit: 88780e3ec24d4bbb98d1d53f58517695114970cd

Commit: 88780e3ec24d4bbb98d1d53f58517695114970cd

Tree: 1e96d309f13ad7066262f10c61764bed962c9f80

Author: NoahLinckeScout

Committer: NoahLinckeScout

## Message

```
fix(server): recover each heartbeat round rather than ending it on first error

Cursor Bugbot on the previous commit: Effect.catch sat outside Effect.repeat,
and Effect.repeat terminates a failing effect, so the first transient read or
utimes error stopped the heartbeat for the rest of the process. Once the
heartbeat stops, the lock it protects can be reclaimed out from under a live
holder.

Recovery now lives inside the round: each tick is caught individually, and
the repeat wraps the recovered tick. Verified: serverSingleton suite 14/14,
typecheck exit 0.

```

## Parents

- [5dd4ca7ff38c4efdc7bf6fe7e9b9fd689c33d3fe](https://git.cafe/pingdotgg/t3code/commit/5dd4ca7ff38c4efdc7bf6fe7e9b9fd689c33d3fe?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/88780e3ec24d4bbb98d1d53f58517695114970cd?format=markdown)
