From 9f40925199035ba1df5f94722ce193a1e832dcd4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 3 Jun 2020 16:18:56 +0200 Subject: [PATCH] Unexport network.Stop An exported function makes it look like it can be called from any goroutine. --- user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user.go b/user.go index dacf13b..a58fecd 100644 --- a/user.go +++ b/user.go @@ -130,7 +130,7 @@ func (net *network) run() { } } -func (net *network) Stop() { +func (net *network) stop() { select { case <-net.stopped: 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:]...) return nil }