Remove unnecessary assignments.

This commit is contained in:
Joachim Bauch 2021-04-21 14:12:11 +02:00
parent 0dd2e8a086
commit 047e6655a1
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02
2 changed files with 2 additions and 2 deletions

View file

@ -322,7 +322,7 @@ func (s *ClientSession) closeAndWait(wait bool) {
s.sessionSubscription = nil
}
go func(virtualSessions map[*VirtualSession]bool) {
for session, _ := range virtualSessions {
for session := range virtualSessions {
session.Close()
}
}(s.virtualSessions)

2
hub.go
View file

@ -232,7 +232,7 @@ func NewHub(config *goconf.ConfigFile, nats NatsClient, r *mux.Router, version s
var ip net.IP
var ipNet *net.IPNet
if strings.Contains(option, "/") {
ip, ipNet, err = net.ParseCIDR(option)
_, ipNet, err = net.ParseCIDR(option)
if err != nil {
return nil, fmt.Errorf("Could not parse CIDR %s: %s", option, err)
}