# fix\(server\): close remaining data-directory lock races · pingdotgg/t3code

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

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

Visibility: public

Requested revision: 455dcf4b2d44b5bfa1eef29de67f57e3b41c603e

Requested commit: 455dcf4b2d44b5bfa1eef29de67f57e3b41c603e

Commit: 455dcf4b2d44b5bfa1eef29de67f57e3b41c603e

Tree: e9ef64a9099aedd61f0b17fd3f8bd53c91cf4151

Author: NoahLinckeScout

Committer: NoahLinckeScout

## Message

```
fix(server): close remaining data-directory lock races

CodeRabbit on the current HEAD: record the bound port as soon as the
socket exists, make the lock a dependency of persistence as well as
HTTP, and serialize stale-lock takeover so two reclaimers cannot both
delete and recreate the same claim.

Co-authored-by: Cursor <cursoragent@cursor.com>

```

## Parents

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

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