Prevent influx from panicking on connect

pull/7507/head
Edd Robinson 2016-10-24 16:09:06 +01:00
parent e35178870e
commit 0ae775f230
1 changed files with 2 additions and 1 deletions

View File

@ -599,7 +599,8 @@ func (c *CommandLine) DatabaseToken() (string, error) {
if err != nil {
return "", err
}
if response.Error() != nil || len((*response).Results[0].Series) == 0 {
if response.Error() != nil || len(response.Results) == 0 || len(response.Results[0].Series) == 0 {
return "", nil
}