[sync] add break when removing peers

pull/3422/head
Jacky Wang 4 years ago
parent aad516fa39
commit 5fcee1fd71
No known key found for this signature in database
GPG Key ID: 1085CE5F4FF5842C
  1. 1
      api/service/syncing/syncing.go

@ -134,6 +134,7 @@ func (sc *SyncConfig) RemovePeer(peer *SyncPeerConfig) {
for i, p := range sc.peers {
if p == peer {
sc.peers = append(sc.peers[:i], sc.peers[i+1:]...)
break
}
}
utils.Logger().Info().Str("peerIP", peer.ip).Str("peerPortMsg", peer.port).

Loading…
Cancel
Save