Where can I find a good example of how to close down with async pymodbus.server.ServerAsyncStop()? #1482
-
| 
         Hi community, Where can I find a good example of how to close down with async pymodbus.server.ServerAsyncStop()? I want to run the server for a fixed amount of time and not running forever? How is the stop function working? I cannot seem to find a good example. Best regards,  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            janiversen
          
      
      
        Apr 10, 2023 
      
    
    Replies: 1 comment
-
| 
         We have tests where it is done a lot, have a look at test/test_examples.py. But really in async it is very simple just do "await ServerAsyncStop()"  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        janiversen
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
We have tests where it is done a lot, have a look at test/test_examples.py.
But really in async it is very simple just do "await ServerAsyncStop()"