diff --git a/session.go b/session.go index 8965f0f54..491fa8bf4 100644 --- a/session.go +++ b/session.go @@ -250,6 +250,9 @@ func (s *Session) init() error { filteredHosts = append(filteredHosts, host) } } + if len(filteredHosts) < 1 { + return errors.New("expected at least one host will pass the filter") + } hosts = filteredHosts }