Skip to content
Snippets Groups Projects
Commit 57871c3f authored by Maximilian Wilhelm's avatar Maximilian Wilhelm
Browse files

RLock() is enough for IsContributingASN().

parent b081574f
No related branches found
No related tags found
No related merge requests found
......@@ -75,8 +75,8 @@ func (c *ContributingASNs) Remove(asn uint32) {
// IsContributingASN checks if a given ASN is part of the contributing ASNs
func (c *ContributingASNs) IsContributingASN(asn uint32) bool {
c.contributingASNsLock.Lock()
defer c.contributingASNsLock.Unlock()
c.contributingASNsLock.RLock()
defer c.contributingASNsLock.RUnlock()
for _, cASN := range c.contributingASNs {
if asn == cASN.asn {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment