try reconnecting on errors