# Insert project id in connection's project during project registration · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/32fd4eb3ac4796cdb1aae45647459c0d78b0105f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 32fd4eb3ac4796cdb1aae45647459c0d78b0105f

Requested commit: 32fd4eb3ac4796cdb1aae45647459c0d78b0105f

Commit: 32fd4eb3ac4796cdb1aae45647459c0d78b0105f

Tree: d4c7e94baa6cf6944b5cd6a4250e06accdf385e9

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Insert project id in connection's project during project registration

...in contrast to doing so during worktree registration. This fixes a
randomized test failure which would panic because store invariants would be
violated. This would happen when a peer disconnected before it had a chance
to register a worktree because, when removing all the state associated with
that peer upon disconnection, we would notice the registered project without
however finding it in the peer's connection state.

```

## Parents

- [222cd098388512c4e654b32062074e09c5d61d45](https://git.cafe/gitcafe/zed/commit/222cd098388512c4e654b32062074e09c5d61d45?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/32fd4eb3ac4796cdb1aae45647459c0d78b0105f?format=markdown)
