diff --git a/service/xboard/service.go b/service/xboard/service.go index bcaa94e4..486e0aa3 100644 --- a/service/xboard/service.go +++ b/service/xboard/service.go @@ -563,9 +563,6 @@ func (s *Service) setupNode() error { inner.Port = config.ServerPort } } - if inner.Port == 0 { - return fmt.Errorf("missing listen port for protocol %s", protocol) - } if inner.Cipher == "" { inner.Cipher = config.Cipher } @@ -599,6 +596,9 @@ func (s *Service) setupNode() error { s.logger.Error("Xboard setup error: could not identify protocol. Please check debug logs for raw JSON.") return fmt.Errorf("unsupported protocol: empty") } + if inner.Port == 0 { + return fmt.Errorf("missing listen port for protocol %s", protocol) + } s.logger.Info("Xboard protocol identified: ", protocol) s.protocol = protocol