diff --git a/control/cmd_event.go b/control/cmd_event.go index 1e054e3..3c9856f 100644 --- a/control/cmd_event.go +++ b/control/cmd_event.go @@ -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:]