Moved -1 check

This commit is contained in:
csucu 2018-07-22 17:32:29 +01:00
parent ba5dbc955d
commit 4aedc493a3
1 changed files with 3 additions and 4 deletions

View File

@ -275,10 +275,9 @@ func (c *Conn) relayAsyncEvents(resp *Response) {
index := strings.Index(resp.Data[0], " ")
if index == -1 {
index = strings.Index(resp.Data[0], "\r\n")
}
if index == -1 {
return
if index == -1 {
return
}
}
code, data = resp.Data[0][:index], resp.Data[0][index+2:]