From 019b407e74677d814fcfb8f18252ad19b414a592 Mon Sep 17 00:00:00 2001 From: Evstigneev Denis Date: Wed, 13 Mar 2024 10:49:58 +0300 Subject: [PATCH 1/2] update WaitOptions --- server/options.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/options.go b/server/options.go index e6754992..bc814c99 100644 --- a/server/options.go +++ b/server/options.go @@ -3,18 +3,19 @@ package server import ( "context" "crypto/tls" + "go.unistack.org/micro/v3/codec" "net" "sync" "time" "go.unistack.org/micro/v3/broker" - "go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v3/meter" "go.unistack.org/micro/v3/network/transport" "go.unistack.org/micro/v3/options" "go.unistack.org/micro/v3/register" + msync "go.unistack.org/micro/v3/sync" "go.unistack.org/micro/v3/tracer" "go.unistack.org/micro/v3/util/id" ) @@ -47,7 +48,7 @@ type Options struct { // Listener may be passed if already created Listener net.Listener // Wait group - Wait *sync.WaitGroup + Wait *msync.WaitGroup // TLSConfig specifies tls.Config for secure serving TLSConfig *tls.Config // Metadata holds the server metadata @@ -282,7 +283,7 @@ func Wait(wg *sync.WaitGroup) Option { if wg == nil { wg = new(sync.WaitGroup) } - o.Wait = wg + o.Wait = msync.WrapWaitGroup(wg) } } @@ -331,7 +332,6 @@ func GracefulTimeout(td time.Duration) Option { } } - // HandlerOptions struct type HandlerOptions struct { // Context holds external options -- 2.45.2 From 701afb7bea118f2a9e862705ad9c1c1a4079247f Mon Sep 17 00:00:00 2001 From: Evstigneev Denis Date: Wed, 13 Mar 2024 10:51:03 +0300 Subject: [PATCH 2/2] sort imports --- server/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/options.go b/server/options.go index bc814c99..e320ff86 100644 --- a/server/options.go +++ b/server/options.go @@ -3,12 +3,12 @@ package server import ( "context" "crypto/tls" - "go.unistack.org/micro/v3/codec" "net" "sync" "time" "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v3/meter" -- 2.45.2