It's possible that handleIncomingMessages is run when the remote
endpoint has already failed or been closed. These cases are in fact
premature exits, and in the case of a failure, ConnectionLost must be
enqueued. An example case: connect and send bottom. The value may be
evaluated before handleIncomingMessages (run in a separate thread)
begins to receive on the socket, and so the event may be skipped, and
the testSendException case from network-transport-tests will timeout.
It's possible that handleIncomingMessages is run when the remote endpoint has already failed or been closed. These cases are in fact premature exits, and in the case of a failure, ConnectionLost must be enqueued. An example case: connect and send bottom. The value may be evaluated before handleIncomingMessages (run in a separate thread) begins to receive on the socket, and so the event may be skipped, and the testSendException case from network-transport-tests will timeout.