Skip to content

Close the connection when context is canceled

Igor Drozdov requested to merge id-login-grace-time into main

When graceful shutdown timeout expires, the global context is canceled. All the operations dependent on it are canceled as well.

Unfortunately, some of the operations doesn't respect the context. For example, SSH connection initialization.

In this case, we need to manually close the connection. One of the options is to wait for ctx.Done() and close the connection

Related issue: #572 (closed)

Merge request reports