chatClient.closeConnection() and chatClient.disconnectUser() #677
              
                
                  
                  
                    Answered
                  
                  by
                    imtoori
                  
              
          
                  
                    
                      Abacaxi-Nelson
                    
                  
                
                  asked this question in
                Q&A
              
            -
| 
         Hi all im lost between chatClient.closeConnection();
await chatClient.disconnectUser();Do we need to call both on signout ?  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            imtoori
          
      
      
        Sep 15, 2021 
      
    
    Replies: 1 comment
-
| 
         hey @Abacaxi-Nelson 
 you would call the former when you want to temporarily close the connection, the latter is used for signout  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        imtoori
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
hey @Abacaxi-Nelson
closeConnectioncloses the connection without clearing the userThis will not trigger default auto-retry mechanism for reconnection.
You need to call
openConnectionto reconnect.disconnectUsercloses the connection and clears the state of the clientyou would call the former when you want to temporarily close the connection, the latter is used for signout