mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-12 04:53:47 +08:00
优化服务退出流程,增加中间件文档
This commit is contained in:
@@ -75,7 +75,7 @@ func (s *sAuthClient) Start(ctx context.Context) {
|
||||
|
||||
// Stop 停止服务
|
||||
func (s *sAuthClient) Stop(ctx context.Context) {
|
||||
if s.client != nil {
|
||||
if s.client != nil && !s.client.IsStop() {
|
||||
s.client.Stop()
|
||||
g.Log().Debug(ctx, "AuthClient stop..")
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ func (s *sCronClient) Start(ctx context.Context) {
|
||||
|
||||
// Stop 停止服务
|
||||
func (s *sCronClient) Stop(ctx context.Context) {
|
||||
if s.client != nil {
|
||||
if s.client != nil && !s.client.IsStop() {
|
||||
s.client.Stop()
|
||||
g.Log().Debug(ctx, "CronClient stop..")
|
||||
}
|
||||
|
Reference in New Issue
Block a user