# Cap \`MessageStream\` buffer size to 1MB · gitcafe/zed

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

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

Visibility: public

Requested revision: 339069b1d38774702da27236dbb791745db1ecd5

Requested commit: 339069b1d38774702da27236dbb791745db1ecd5

Commit: 339069b1d38774702da27236dbb791745db1ecd5

Tree: 9ffd19bb819046969d412352da57ecd7e39e9090

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Cap `MessageStream` buffer size to 1MB

We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.

```

## Parents

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

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