Added additional onerror to catch econnreset errors