Unexport network.Stop

An exported function makes it look like it can be called from any
goroutine.
This commit is contained in:
Simon Ser 2020-06-03 16:18:56 +02:00
parent 1622b772ab
commit 9f40925199
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -130,7 +130,7 @@ func (net *network) run() {
} }
} }
func (net *network) Stop() { func (net *network) stop() {
select { select {
case <-net.stopped: case <-net.stopped:
return return
@ -452,7 +452,7 @@ func (u *user) deleteNetwork(id int64) error {
} }
}) })
net.Stop() net.stop()
u.networks = append(u.networks[:i], u.networks[i+1:]...) u.networks = append(u.networks[:i], u.networks[i+1:]...)
return nil return nil
} }