# recent_projects: Fix read ssh server index always being 0 \(\#59817\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a1d0015e70b22c6f8bd2da37c1e0861b2b55b82b

Requested commit: a1d0015e70b22c6f8bd2da37c1e0861b2b55b82b

Commit: a1d0015e70b22c6f8bd2da37c1e0861b2b55b82b

Tree: 7fe0aaf5c19c2b830d65dfa86964ec68075a51c4

Author: Ramon

Committer: GitHub

## Message

```
recent_projects: Fix read ssh server index always being 0 (#59817)

# Objective

Fixes https://github.com/zed-industries/zed/issues/59676

## Solution

Right now the queue / fetch logic is mixing async and sync flows. A task
might append something to the queue, but the queue fetching does not
respect/wait on that. Making this synchronous and in-memory fixes this.

`add_ssh_server` also appends it to the end of the queue, so we need to
get the last index, not index 0.

## Testing

I manually tested it before and after by reproducing the steps in the
original issue. Added a regression test afterwards.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A

---------

Co-authored-by: Yara <git@yara.blue>
```

## Parents

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

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