mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-06-22 10:49:58 -04:00
check number of shadowsocks servers
This commit is contained in:
@@ -28,6 +28,9 @@ func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) {
|
||||
for _, rec := range config.Server {
|
||||
serverList.AddServer(protocol.NewServerSpecFromPB(*rec))
|
||||
}
|
||||
if serverList.Size() == 0 {
|
||||
return nil, newError("0 server")
|
||||
}
|
||||
client := &Client{
|
||||
serverPicker: protocol.NewRoundRobinServerPicker(serverList),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user