mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-26 19:48:34 +00:00
broker
This commit is contained in:
@@ -15,6 +15,7 @@ const (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Worker int `json:"workerNum"`
|
||||
Host string `json:"host"`
|
||||
Port string `json:"port"`
|
||||
Cluster RouteInfo `json:"cluster"`
|
||||
@@ -57,6 +58,12 @@ func LoadConfig() (*Config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if config.Worker == 0 {
|
||||
config.Worker = 1024
|
||||
}
|
||||
|
||||
WorkNum = config.Worker
|
||||
|
||||
if config.Port != "" {
|
||||
if config.Host == "" {
|
||||
config.Host = "0.0.0.0"
|
||||
|
||||
Reference in New Issue
Block a user