PAMI
PAMI copied to clipboard
Fixed #57: Incorrect EOF test in getMessages
It's possible to send a Logoff action. When this happens, Asterisk sends a response message and then close the connection. With this PR is possible to read the Logoff response message without throwing an exception if it's the last message and the connection is closed after that.
Also related to #121, because it's a good practice to send a logoff to disconnect, but sending it could throws an exception at this moment. This PR fix this.
Some little fixes on the code found debugging it.