Implement reconnect after error.