You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when calling .disconnect(), you're performing a socket.end() but providing no callback for when the socket is completely closed. You could do this by listening to the 'close' event, i.e.
I see now that you expose an "ami_socket_close" event when the underlying socket is closed, so I suppose a consumer of this library could use that, i.e.
function closeAmi(callback) {
ami.on('ami_socket_close', function () {
callback();
});
ami.disconnect();
}
when calling .disconnect(), you're performing a socket.end() but providing no callback for when the socket is completely closed. You could do this by listening to the 'close' event, i.e.
You shouldn't need to remove the close listener on the socket because the socket should be destroyed when the connection is closed.
Sorry I'm lazy and didn't do a PR because this was just a tangential thought while reviewing someone's code.
The text was updated successfully, but these errors were encountered: