Skip to content

Commit 8409d2b

Browse files
modify review comments
1 parent a88dfe9 commit 8409d2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: addresspool/pool.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ func (p *Pool) checkConnectivity() {
237237
p.mutex.Lock()
238238
p.status = status
239239
p.statusHistory = append(p.statusHistory, status)
240-
if len(p.statusHistory) > 3 {
241-
p.statusHistory = p.statusHistory[1:]
240+
cnt := len(p.statusHistory)
241+
if cnt > 3 {
242+
p.statusHistory = p.statusHistory[(cnt - 3):]
242243
}
243244
p.mutex.Unlock()
244245
}

0 commit comments

Comments
 (0)