-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Resolved a concurrency issue with ClientCounter. Previously, …
…directly decrementing ClientCounter in multiple goroutines (ClientCounter--) could lead to data races and inconsistencies. Now, by using atomic.AddInt32(&ClientCounter, -1), we ensure safe updates to the counter, maintaining its accuracy and stability even in high concurrency scenarios.
- Loading branch information
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters