loong95 opened a new pull request, #2398:
URL: https://github.com/apache/hertzbeat/pull/2398

   ## What's changed?
   
   Fix [bug 1480](https://github.com/apache/hertzbeat/issues/1480)
   
   * A cancel signal needs to be sent if the execution times out, otherwise the 
session cannot be closed promptly.
   * Call `ChannelExec.close` with the 'false' parameter to ensure the session 
is not kept alive.
   
   If you want to reproduce the bug, set an ssh command that takes longer to 
execute than the timeout duration, such as 'sleep 10'. After the number of 
timeout occurrences reaches MaxSessions, it will trigger 'no session'.
   
   ## Checklist
   
   - [x]  I have read the [Contributing 
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
   - [x]  I have written the necessary doc or comment.
   - [x]  I have added the necessary unit tests and all cases have passed.
   
   ## Add or update API
   
   - [ ] I have added the necessary [e2e 
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have 
passed.
   


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