Skip to content

Commit c39179a

Browse files
committed
ensuring that at least one host will pass the filter during the initial host lookup
1 parent bf16ec3 commit c39179a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

session.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ func (s *Session) init() error {
250250
filteredHosts = append(filteredHosts, host)
251251
}
252252
}
253+
if len(filteredHosts) < 1 {
254+
return errors.New("expected at least one host will pass the filter")
255+
}
253256

254257
hosts = filteredHosts
255258
}

0 commit comments

Comments
 (0)