Fix reconnect attempts and chunked response parsing