client handle read -1 error