mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-10-31 07:02:13 +08:00 
			
		
		
		
	Run() crashes if server can't be setup
This commit is contained in:
		
							parent
							
								
									2e50e2cc60
								
							
						
					
					
						commit
						615f19961e
					
				
							
								
								
									
										4
									
								
								gin.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								gin.go
									
									
									
									
									
								
							| @ -129,7 +129,9 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { | ||||
| } | ||||
| 
 | ||||
| func (engine *Engine) Run(addr string) { | ||||
| 	http.ListenAndServe(addr, engine) | ||||
| 	if err := http.ListenAndServe(addr, engine); err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /************************************/ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user