fixed usage of exhaust to avoid blocking call to recv