diff --git a/Gopkg.lock b/Gopkg.lock index 962daf61..dcfd8d7e 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -21,12 +21,13 @@ branch = "master" name = "github.com/fatedier/golib" packages = [ + "control/shutdown", "crypto", "errors", "io", "pool" ] - revision = "0508aee5d2b1b6be52b00cf4cf00e6430a71e39e" + revision = "d7011355f61fc8a2d1e38114604b5c14397841c4" [[projects]] branch = "frp" @@ -159,6 +160,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "4876e5a22dfa4bb103f18d44151253b5e8a321f6b64f5ce6403682750b8ff7d5" + inputs-digest = "8a34960c52b0b575f8e5cb799e6af7288fe0289cb3b76b9346a2b69b677a3977" solver-name = "gps-cdcl" solver-version = 1 diff --git a/client/control.go b/client/control.go index b2a7aaa7..7c183c28 100644 --- a/client/control.go +++ b/client/control.go @@ -27,10 +27,10 @@ import ( "github.com/fatedier/frp/models/msg" "github.com/fatedier/frp/utils/log" frpNet "github.com/fatedier/frp/utils/net" - "github.com/fatedier/frp/utils/shutdown" "github.com/fatedier/frp/utils/util" "github.com/fatedier/frp/utils/version" + "github.com/fatedier/golib/control/shutdown" "github.com/fatedier/golib/crypto" fmux "github.com/hashicorp/yamux" ) diff --git a/server/control.go b/server/control.go index 0f5c4b03..26a0cf12 100644 --- a/server/control.go +++ b/server/control.go @@ -26,9 +26,9 @@ import ( frpErr "github.com/fatedier/frp/models/errors" "github.com/fatedier/frp/models/msg" "github.com/fatedier/frp/utils/net" - "github.com/fatedier/frp/utils/shutdown" "github.com/fatedier/frp/utils/version" + "github.com/fatedier/golib/control/shutdown" "github.com/fatedier/golib/crypto" "github.com/fatedier/golib/errors" ) diff --git a/utils/shutdown/shutdown_test.go b/utils/shutdown/shutdown_test.go deleted file mode 100644 index bd6507a5..00000000 --- a/utils/shutdown/shutdown_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package shutdown - -import ( - "testing" - "time" -) - -func TestShutdown(t *testing.T) { - s := New() - go func() { - time.Sleep(time.Millisecond) - s.Start() - }() - s.WaitStart() - - go func() { - time.Sleep(time.Millisecond) - s.Done() - }() - s.WaitDone() -} diff --git a/utils/shutdown/shutdown.go b/vendor/github.com/fatedier/golib/control/shutdown/shutdown.go similarity index 100% rename from utils/shutdown/shutdown.go rename to vendor/github.com/fatedier/golib/control/shutdown/shutdown.go