Handle socket errors during HTTP.