Ends an asynchronous GetMessages.