[client] Stay connected with login command (#7384)

This commit is contained in:
Theodor Midtlien
2026-09-01 18:04:11 +02:00
committed by GitHub
parent ebc259e30b
commit e5c0cdf958
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -653,6 +653,11 @@ func (s *Server) Login(callerCtx context.Context, msg *proto.LoginRequest) (*pro
}
state := internal.CtxGetState(s.rootCtx)
status := state.CurrentStatus()
if status == internal.StatusConnected {
return &proto.LoginResponse{}, nil
}
defer func() {
status, err := state.Status()
if err != nil || (status != internal.StatusNeedsLogin && status != internal.StatusLoginFailed) {