We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35f60a5 commit c2b63bdCopy full SHA for c2b63bd
intra/core/connmap.go
@@ -110,16 +110,14 @@ func (h *cm) addByPidLocked(pid, cid string) {
110
if len(pid) <= 0 || len(cid) <= 0 {
111
return
112
}
113
- // TODO: remove duplicates
114
- h.tracp[pid] = append(h.tracp[pid], cid)
+ h.tracp[pid] = CopyUniq(h.tracp[pid], []string{cid})
115
116
117
func (h *cm) addByUidLocked(uid, cid string) {
118
if len(uid) <= 0 || len(cid) <= 0 {
119
120
121
122
- h.tracu[uid] = append(h.tracu[uid], cid)
+ h.tracu[uid] = CopyUniq(h.tracu[uid], []string{cid})
123
124
125
func (h *cm) getLocked(cid string) *connstat {
0 commit comments