Skip to content

Commit

Permalink
fix: start automatic group ids at 0 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
soehrl authored Nov 30, 2024
1 parent ac17363 commit acc8160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- This CHANGELOG file that will contain all notable changes to this project ([#1](https://github.com/soehrl/camure/pull/1))

### Fixed
- Automatically assigned group IDs start now at 0 ([#2](https://github.com/soehrl/camure/pull/2))
2 changes: 1 addition & 1 deletion src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl Coordinator {
.ok_or(GroupCreateError::GroupIdInUse(channel_id))?
} else {
let mut channel = None;
for channel_id in 1..=GroupId::MAX {
for channel_id in 0..=GroupId::MAX {
if let Some(c) = self
.socket
.allocate_channel(channel_id.into(), receive_capacity)
Expand Down

0 comments on commit acc8160

Please sign in to comment.