Skip to content

Commit

Permalink
chore: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Oct 18, 2024
1 parent 95c6430 commit 2a34e48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/@local/harpc/net/src/session/server/session_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ impl SessionIdProducer {
self.next += 1;

// never overflows because right before it reaches usize::MAX, it will be reset to 0
// `usize::MAX` is reserved for the client, as it is unaware of the session id (it's only
// used on the server to track connections)
if self.next == usize::MAX {
self.next = 0;
}
Expand Down

0 comments on commit 2a34e48

Please sign in to comment.