Unexport network.Stop
An exported function makes it look like it can be called from any goroutine.
This commit is contained in:
parent
1622b772ab
commit
9f40925199
4
user.go
4
user.go
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user