Fix handling of EOF in Client#readpartial