How to dispose languageclient and websocket connection properly #729
              
                Unanswered
              
          
                  
                    
                      buglessbuild
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| @shivam6543 this is not an issue and therefore I transferred it to a discussion. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Team,
I would like to know how to dispose the existing
LanguageclientandWebSocket LSPconnection before creating a new one. My use case involves creating a newLanguageClientandLSP WebSocketconnection when switching to a different language. However, before doing that, I need to dispose the existing connections. But when I try to change the language while the current connection is initializing (between the initialize and initialized messages), it throws this error:Seems like it's not able to dispose the connection that's initializing.
Currently, I am handling it like this:
If I switch to different language after initialization, it works fine.
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions