Replace manual atomic operations with atomic.Bool type for better
type safety and cleaner code. This modernizes the atomic usage
pattern from atomic.LoadInt32/StoreInt32 to the newer Load/Store
methods on atomic.Bool.
- Update activeTCPConn.closed field type from int32 to atomic.Bool
- Replace atomic.LoadInt32(&a.closed) with a.closed.Load()
- Replace atomic.StoreInt32(&a.closed, 1) with a.closed.Store(true)
All existing functionality preserved with improved type safety.
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
tweak
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>