mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-26 21:22:16 +08:00 
			
		
		
		
	fix(main): fix openim scripts start rpc log (#1877)
* Update start.go * Update start.go
This commit is contained in:
		
							parent
							
								
									8729f90d02
								
							
						
					
					
						commit
						9610da9123
					
				| @ -17,7 +17,6 @@ package startrpc | |||||||
| import ( | import ( | ||||||
| 	"errors" | 	"errors" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"log" |  | ||||||
| 	"net" | 	"net" | ||||||
| 	"net/http" | 	"net/http" | ||||||
| 	"os" | 	"os" | ||||||
| @ -117,7 +116,8 @@ func Start( | |||||||
| 			// Create a HTTP server for prometheus. | 			// Create a HTTP server for prometheus. | ||||||
| 			httpServer := &http.Server{Handler: promhttp.HandlerFor(reg, promhttp.HandlerOpts{}), Addr: fmt.Sprintf("0.0.0.0:%d", prometheusPort)} | 			httpServer := &http.Server{Handler: promhttp.HandlerFor(reg, promhttp.HandlerOpts{}), Addr: fmt.Sprintf("0.0.0.0:%d", prometheusPort)} | ||||||
| 			if err := httpServer.ListenAndServe(); err != nil { | 			if err := httpServer.ListenAndServe(); err != nil { | ||||||
| 				log.Fatal("Unable to start a http server. ", err.Error(), "PrometheusPort:", prometheusPort) | 				fmt.Fprintf(os.Stderr, "\n\nexit -1: \n%+v PrometheusPort: %d \n\n", err, prometheusPort) | ||||||
|  | 				os.Exit(-1) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		return nil | 		return nil | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user