Skip to content

Commit

Permalink
Add heartbeat support (#153)
Browse files Browse the repository at this point in the history
* Update to support zero-size frame items

* Add heartbeat functionality with client reconnecting logic

* Fix connection reauthentication failures preventing future reauthentication

* More logging

* Remove persist

* Update connection logic to have server take on client id rather than having client take on server id during reconnect

* Bump minimum rust version to 1.64.0

* Bump to v0.20.0-alpha.3 and fix clippy warnings

* Update cargo.lock
  • Loading branch information
chipsenkbeil authored Nov 27, 2022
1 parent ee59555 commit ee50eaf
Show file tree
Hide file tree
Showing 54 changed files with 1,418 additions and 931 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- { rust: stable, os: windows-latest, target: x86_64-pc-windows-msvc }
- { rust: stable, os: macos-latest }
- { rust: stable, os: ubuntu-latest }
- { rust: 1.61.0, os: ubuntu-latest }
- { rust: 1.64.0, os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ matrix.rust }}
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.20.0-alpha.3]

### Added

- `Frame::empty` method as convenience for `Frame::new(&[])`
- `ClientConfig` to support `ReconnectStrategy` and a duration serving as the
maximum time to wait between server activity before attempting to reconnect
from the client
- Server sends empty frames periodically to act as heartbeats to let the client
know if the connection is still established
- Client now tracks length of time since last server activity and will attempt
a reconnect if no activity beyond that point

### Changed

- `Frame` methods `read` and `write` no longer return an `io::Result<...>`
and instead return `Option<Frame<...>>` and nothing respectively
- `Frame::read` method now supports zero-size items
- `Client::inmemory_spawn` and `UntypedClient::inmemory_spawn` now take a
`ClientConfig` as the second argument instead of `ReconnectStrategy`
- Persist option now removed from `ProcSpawn` message and CLI
- Bump minimum Rust version to 1.64.0

## [0.20.0-alpha.2] - 2022-11-20

### Added
Expand Down
Loading

0 comments on commit ee50eaf

Please sign in to comment.