diff options
| author | Paul Buetow <paul@buetow.org> | 2023-06-20 02:06:22 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-06-20 02:06:22 +0300 |
| commit | 84e5a4ae93eed6397a6cbf6091a0f5b3eacc78e2 (patch) | |
| tree | 4f0eec662496e9e420bc7c9f4c9743bbe2369d60 /internal/config | |
| parent | ffb4f2dd193f631ac85c4c650163491b41eefefd (diff) | |
add expiry log
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index ff8d452..ec4ea67 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -83,7 +83,8 @@ func (conf Config) NodeNumber(node string) int { return nodeNumber } - log.Println("config:", fmt.Errorf("node %s not found - it will affect it's score!", node)) + log.Println("config:", + fmt.Errorf("node %s not found - it will affect it's score!", node)) return 0 } @@ -99,7 +100,9 @@ func (conf Config) IsNode(remoteAddr string) bool { return false } -func (conf Config) IsNodeWithLookup(remoteAddr string, lookupIP func(string) ([]net.IP, error)) bool { +func (conf Config) IsNodeWithLookup(remoteAddr string, + lookupIP func(string) ([]net.IP, error)) bool { + remoteAddr = utils.StripPort(remoteAddr) for _, node := range conf.Nodes { |
