[GODRIVER-812] Server String() function access unprotected variables Created: 06/Feb/19  Updated: 28/Oct/23  Resolved: 13/Feb/19

Status: Closed
Project: Go Driver
Component/s: Internal
Affects Version/s: None
Fix Version/s: 1.0.0-rc1

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The Server type's String function accesses variables from the struct which can be updated asynchronously. Fields like averageRTT should be taken from the immutable description rather than the server struct itself. connectionstate should be changed to use the atomic package so it can be loaded/stored without race conditions.



 Comments   
Comment by Githook User [ 13/Feb/19 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-812 Make Server.String() access variables atomicly

Change-Id: I7f30551b651f5f202050b9c5bdb3e7b24d5bc37d
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/3fc0cdbe25028dcffc594169fd5c87c8c9c8f30e

Generated at Thu Feb 08 08:35:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.