Clean the error path a bit by not leaving the receive function in case of a disconnection.