File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -418,13 +418,7 @@ type scWrapper struct {
418418}
419419
420420func (scw * scWrapper ) updateLocalityID (lID clients.Locality ) {
421- // Store a pointer to a new, heap-allocated clients.Locality because the
422- // pointer (scw.locality) is stored in an atomic.Pointer, and must remain
423- // valid for concurrent access by other goroutines even after this function
424- // returns.
425- l := new (clients.Locality )
426- * l = lID
427- scw .locality .Store (l )
421+ scw .locality .Store (& lID )
428422}
429423
430424func (scw * scWrapper ) localityID () clients.Locality {
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ func (s) TestNewStream_Error(t *testing.T) {
359359// request on the server is same as sent. It then wait to receive a
360360// testDiscoverResponse from the server and verifies that the received
361361// discovery response is same as sent from the server.
362- func ( s ) TestStream_SendAndRecv (t * testing.T ) {
362+ func TestStream_SendAndRecv (t * testing.T ) {
363363 ctx , cancel := context .WithTimeout (context .Background (), defaultTestTimeout )
364364 defer cancel ()
365365
You can’t perform that action at this time.
0 commit comments