fix some ancient SpSocket problems in generating good error messages