catch socket reset as EOF