Skip to content

Commit d47e8a4

Browse files
committed
release pointer
1 parent 0318212 commit d47e8a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ func (a *agent) reportConnectionsLoop(ctx context.Context, aAPI proto.DRPCAgentC
775775

776776
// Remove the payload we sent.
777777
a.reportConnectionsMu.Lock()
778+
a.reportConnections[0] = nil // Release the pointer from the underlying array.
778779
a.reportConnections = a.reportConnections[1:]
779780
a.reportConnectionsMu.Unlock()
780781
}

0 commit comments

Comments
 (0)