Skip to content

Commit

Permalink
if the DisableValues is passed then set the validator internally to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann authored and petar committed Aug 14, 2020
1 parent f41dd65 commit 455320a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dht_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func (c *config) applyFallbacks(h host.Host) error {
return fmt.Errorf("the default validator was changed without being marked as changed")
}
}

if !c.enableValues {
c.validator = nil
}
return nil
}

Expand Down

0 comments on commit 455320a

Please sign in to comment.