From 27b34a36bd7f76e10ab348b176eca19a4f6a0972 Mon Sep 17 00:00:00 2001 From: mcrgnt Date: Mon, 3 Aug 2026 12:42:05 +0300 Subject: [PATCH] Restore break after parsing single-line AGI response in Command() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without break, Scanner.Scan blocks waiting for another line while Asterisk keeps the session open awaiting the next command — deadlock after every successful response. Multi-line (NNN-) is still unhandled; this restores the previous correct single-line behavior lost in 1aff494. --- agi.go | 1 + 1 file changed, 1 insertion(+) diff --git a/agi.go b/agi.go index d3f8113..789c234 100644 --- a/agi.go +++ b/agi.go @@ -285,6 +285,7 @@ func (a *AGI) Command(cmd ...string) (resp *Response) { resp.Value = strings.TrimSuffix(strings.TrimPrefix(wrappedVal, "("), ")") // FIXME: handle multiple line return values + break // nolint } if err := s.Err(); err != nil {