Don't read from the socket more than requested. This prevents stalling i...

...ssues (fixes celery/celery#1847).