Added callback to adaptor connect function.