marsevilspirit opened a new pull request, #2943:
URL: https://github.com/apache/dubbo-go/pull/2943

   ## Description
   
   Currently, the `GracefulStop` process for the Triple protocol server lacks a 
timeout mechanism. This can cause the server shutdown to hang indefinitely if 
an underlying issue prevents it from completing, which impacts service 
reliability and automated deployment pipelines.
   
   This PR introduces a timeout for the `GracefulStop` function to ensure that 
the shutdown process completes within a predictable timeframe.
   
   ### Key Changes
   
   - **Added `DefaultGracefulShutdownTimeout` Constant**: A new constant set to 
10 seconds has been added in `common/constant/default.go` to provide a 
centralized and configurable timeout value.
   - **Applied Timeout to `GracefulStop`**: The `GracefulStop` method in 
`protocol/triple/server.go` now uses `context.WithTimeout` to enforce the 
10-second shutdown deadline.
   - **Added Error Logging**: Implemented error logging to capture and report 
any potential errors that occur during the graceful shutdown process, improving 
observability.
   


-- 
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]

Reply via email to