Skip to content

Commit

Permalink
fix(nameserver): panic in nameserver size is changed. (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShannonDing authored Sep 3, 2020
1 parent 80b3acc commit 3d5dab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/namesrv.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (s *namesrvs) getNameServerAddress() string {
s.lock.Lock()
defer s.lock.Unlock()

addr := s.srvs[s.index]
addr := s.srvs[s.index%len(s.srvs)]
index := s.index + 1
if index < 0 {
index = -index
Expand Down

0 comments on commit 3d5dab0

Please sign in to comment.