9be76a3 Merge pull request #1 from LaurenceJJones/review/proxy-fix-races
📊 Changes
1 file changed (+56 additions, -29 deletions)
View changed files
📝proxy/manager.go (+56 -29)
📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Change running from bool to atomic.Bool
Change currentTunnelID from string to atomic.Value
Add getTunnelID() helper for safe reads
Add setTunnelID() helper for safe writes
Add isRunning() helper for safe reads
Add setRunning() helper for safe writes
Update all usages to use the helper methods
This fixes potential race conditions where running and currentTunnelID were being read without holding the mutex in hot paths.
How to test?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/fosrl/newt/pull/276
**Author:** [@LaurenceJJones](https://github.com/LaurenceJJones)
**Created:** 3/16/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `refactor/proxy-fix-races`
---
### 📝 Commits (4)
- [`8a62a4a`](https://github.com/fosrl/newt/commit/8a62a4aae85469f2d9987f6663f34414e1915ae5) refactor(proxy): fix race conditions with atomic types
- [`bfeb87f`](https://github.com/fosrl/newt/commit/bfeb87fed10040512b974327cbf35e94728e46b4) refactor(proxy): capture tunnel ID per connection/flow to avoid misattribution
- [`0b31c78`](https://github.com/fosrl/newt/commit/0b31c7837bb1f95f14f9e71e2566594e38619544) fix: remove twice call
- [`9be76a3`](https://github.com/fosrl/newt/commit/9be76a320fe6aa9a5eb29f374aae7393d0a0eb7d) Merge pull request #1 from LaurenceJJones/review/proxy-fix-races
### 📊 Changes
**1 file changed** (+56 additions, -29 deletions)
<details>
<summary>View changed files</summary>
📝 `proxy/manager.go` (+56 -29)
</details>
### 📄 Description
## Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
## Description
- Change running from bool to atomic.Bool
- Change currentTunnelID from string to atomic.Value
- Add getTunnelID() helper for safe reads
- Add setTunnelID() helper for safe writes
- Add isRunning() helper for safe reads
- Add setRunning() helper for safe writes
- Update all usages to use the helper methods
This fixes potential race conditions where running and currentTunnelID were being read without holding the mutex in hot paths.
## How to test?
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/newt/pull/276
Author: @LaurenceJJones
Created: 3/16/2026
Status: ❌ Closed
Base:
dev← Head:refactor/proxy-fix-races📝 Commits (4)
8a62a4arefactor(proxy): fix race conditions with atomic typesbfeb87frefactor(proxy): capture tunnel ID per connection/flow to avoid misattribution0b31c78fix: remove twice call9be76a3Merge pull request #1 from LaurenceJJones/review/proxy-fix-races📊 Changes
1 file changed (+56 additions, -29 deletions)
View changed files
📝
proxy/manager.go(+56 -29)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
This fixes potential race conditions where running and currentTunnelID were being read without holding the mutex in hot paths.
How to test?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.