Skip to content

Commit 32600dd

Browse files
committed
x
1 parent 5f848b3 commit 32600dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

zrpc/internal/rpcpubserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const (
1818
envPodIp = "POD_IP"
1919
)
2020

21-
var notReadyError = errors.New("service is not ready for a limited time")
21+
var errorNotReady = errors.New("service is not ready for a limited time")
2222

2323
// NewRpcPubServer returns a Server.
2424
func NewRpcPubServer(etcd discov.EtcdConf, listenOn string,
@@ -69,7 +69,7 @@ func (s keepAliveServer) Start(fn RegisterFn) error {
6969
return
7070
}
7171
case <-ctx.Done():
72-
logx.Must(notReadyError)
72+
logx.Must(errorNotReady)
7373
return
7474
}
7575
}

zrpc/internal/serverinterceptors/shutdowninterceptor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
var (
1515
shutdown int32
16-
shutdownError = status.Error(codes.Unavailable, "server is shutting down")
16+
errorShutdown = status.Error(codes.Unavailable, "server is shutting down")
1717
)
1818

1919
func init() {
@@ -44,7 +44,7 @@ func UnaryShutdownInterceptor(ctx context.Context, req any, _ *grpc.UnaryServerI
4444

4545
func handleShutdown(f func() error) error {
4646
if atomic.LoadInt32(&shutdown) == 1 {
47-
return shutdownError
47+
return errorShutdown
4848
}
4949
return f()
5050
}

0 commit comments

Comments
 (0)