mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-01 09:24:49 +08:00
removing port fallback
This commit is contained in:
parent
bad2a0faea
commit
46b2cfef1c
1 changed files with 3 additions and 4 deletions
|
@ -169,6 +169,9 @@ func checkBroker(broker string, port string) error {
|
|||
if broker == "" {
|
||||
return errors.New("error: broker address is blank")
|
||||
}
|
||||
if port == "" {
|
||||
return errors.New("error: broker port is blank")
|
||||
}
|
||||
_, err := net.LookupIP(broker)
|
||||
if err != nil {
|
||||
return errors.New("nslookup failed for broker ... check dns records")
|
||||
|
@ -178,10 +181,6 @@ func checkBroker(broker string, port string) error {
|
|||
if err != nil {
|
||||
logger.Log(1, "error converting port to int: "+err.Error())
|
||||
}
|
||||
if intPort == 0 {
|
||||
logger.Log(1, "port unset in config. Using default of 8883, which may be incorrect.")
|
||||
intPort = 8883
|
||||
}
|
||||
pinger.SetTarget(&ping.Target{
|
||||
Protocol: ping.TCP,
|
||||
Host: broker,
|
||||
|
|
Loading…
Add table
Reference in a new issue