Removes all unrequired checks, since the lifetime now guarantees the non nil presence of connectClient

This commit is contained in:
riccardom
2026-06-18 14:40:03 +02:00
parent 6d3bcef2c4
commit 3204270c4b
6 changed files with 14 additions and 51 deletions
+2 -4
View File
@@ -887,10 +887,8 @@ func (s *Server) cleanupConnection() error {
// until the in-flight run has fully unwound (a clean, synchronous teardown).
// It must run before actCancel: cancelling the context first would make
// Stop observe a dead context and return early without waiting.
if s.connectClient != nil {
if err := s.connectClient.Stop(); err != nil {
return err
}
if err := s.connectClient.Stop(); err != nil {
return err
}
// Stop the retry goroutine so it does not start a fresh run. The client