Fix readpartial loop
Merge pull request #115 from tarcieri/fix/client

Fix readpartial loop