clue/reactphp-ami

Fix parsing empty command output

Closed this issue · 1 comments

clue commented
$api->command('!');
PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'Parse error, no colon in line "--END COMMAND--" found' in ~/workspace/reactphp-asterisk-ami/src/Protocol/Parser.php:51
clue commented

As of 35095e4 parser errors will no longer lead to an uncaught exception. Instead, the will be forwarded as an error event which will subsequently close the connection.

This doesn't fix this bug, but it makes it less less of an issue.