add test for handling 0 bytes read from connection