more configurable reconnect callback