forked from mfulz_github/qmk_firmware
		
	[CLI] qmk docs graceful shutdown on Ctrl+C (#6989)
				
					
				
			This commit is contained in:
		
							parent
							
								
									c54d2cbe02
								
							
						
					
					
						commit
						076d8babbb
					
				@ -19,4 +19,9 @@ def docs(cli):
 | 
				
			|||||||
        cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port)
 | 
					        cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port)
 | 
				
			||||||
        cli.log.info("Press Control+C to exit.")
 | 
					        cli.log.info("Press Control+C to exit.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
            httpd.serve_forever()
 | 
					            httpd.serve_forever()
 | 
				
			||||||
 | 
					        except KeyboardInterrupt:
 | 
				
			||||||
 | 
					            cli.log.info("Stopping HTTP server...")
 | 
				
			||||||
 | 
					        finally:
 | 
				
			||||||
 | 
					            httpd.shutdown()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user