modify socket onerror