From 4d764b2c0538cb3d6827feeb4a391fdad0071329 Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Wed, 15 Apr 2026 11:59:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E4=BF=AE=E6=8E=89=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/xboard/service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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