Skip to content

Commit 172c8ff

Browse files
committed
fix: start message counters at 1
1 parent 3e00517 commit 172c8ff

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/axum.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl<S> From<crate::Router<S>> for IntoAxum<S> {
4040
Self {
4141
router,
4242
task_set: Default::default(),
43-
rx_msg_id: Arc::new(AtomicU32::new(0)),
44-
tx_msg_id: Arc::new(AtomicU32::new(0)),
43+
rx_msg_id: Arc::new(AtomicU32::new(1)),
44+
tx_msg_id: Arc::new(AtomicU32::new(1)),
4545
}
4646
}
4747
}
@@ -52,8 +52,8 @@ impl<S> IntoAxum<S> {
5252
Self {
5353
router,
5454
task_set: handle.into(),
55-
rx_msg_id: Arc::new(AtomicU32::new(0)),
56-
tx_msg_id: Arc::new(AtomicU32::new(0)),
55+
rx_msg_id: Arc::new(AtomicU32::new(1)),
56+
tx_msg_id: Arc::new(AtomicU32::new(1)),
5757
}
5858
}
5959
}

src/pubsub/shared.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ impl ConnectionManager {
8484
next_id: AtomicU64::new(0).into(),
8585
router,
8686
notification_buffer_per_task: DEFAULT_NOTIFICATION_BUFFER_PER_CLIENT,
87-
tx_msg_id: Arc::new(AtomicU32::new(0)),
88-
rx_msg_id: Arc::new(AtomicU32::new(0)),
87+
tx_msg_id: Arc::new(AtomicU32::new(1)),
88+
rx_msg_id: Arc::new(AtomicU32::new(1)),
8989
}
9090
}
9191

0 commit comments

Comments
 (0)