mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
LBClient: panic on empty Clients
This commit is contained in:
@@ -84,6 +84,9 @@ func (cc *LBClient) Do(req *Request, resp *Response) error {
|
||||
}
|
||||
|
||||
func (cc *LBClient) init() {
|
||||
if len(cc.Clients) == 0 {
|
||||
panic("BUG: LBClient.Clients cannot be empty")
|
||||
}
|
||||
for _, c := range cc.Clients {
|
||||
cc.cs = append(cc.cs, &lbClient{
|
||||
c: c,
|
||||
|
||||
Reference in New Issue
Block a user