xmx commented on issue #3042:
URL: https://github.com/apache/dubbo-go/issues/3042#issuecomment-3397241975
当前在 server.NewServer() 时可以配置监听系统信号关闭 server:
```go
internalSignal := true
shutdownCfg := &global.ShutdownConfig{
InternalSignal: &internalSignal,
}
srv, _ := server.NewServer(
server.SetServerShutdown(shutdownCfg),
)
srv.Serve()
```
当前提供的方式还不够优雅:
1. 不能使用自定义的 context
2. NewServer() 时就启动了一个 go 携程监听系统信号
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]