Skip to content

Commit

Permalink
增加配置检测
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Aug 9, 2024
1 parent df8ddea commit 54bafcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serverVO.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/farseer-go/fSchedule/executeStatus"
"github.com/farseer-go/fs/container"
"github.com/farseer-go/fs/core"
"github.com/farseer-go/fs/flog"
"github.com/farseer-go/fs/trace"
"github.com/farseer-go/utils/http"
"math/rand"
Expand All @@ -28,6 +29,9 @@ type serverVO struct {
// 随机一个服务端地址
func (receiver *serverVO) getAddress(ignoreIndex int) (serverAddress, serverIndex) {
count := len(receiver.Address)
if count == 0 {
flog.Panic("./farseer.yml配置文件没有找到FSchedule.Server.Address的设置")
}
if count == 1 {
return receiver.Address[0], 0
}
Expand Down

0 comments on commit 54bafcf

Please sign in to comment.