Skip to content

Commit

Permalink
Update app/stats/online_map.go
Browse files Browse the repository at this point in the history
Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com>
  • Loading branch information
hossinasaadi and mmmray committed Aug 5, 2024
1 parent f8a5732 commit f2d3d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/stats/online_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (c *OnlineMap) AddIP(ip string) {
if ip == "127.0.0.1" {
return
}
if !contains(keys, ip) {
if _, ok := list[ip]; !ok {
c.access.Lock()
list[ip] = time.Now()
c.access.Unlock()
Expand Down

0 comments on commit f2d3d0d

Please sign in to comment.