diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 74ada3b..d0913b1 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
if (!setup)
return;
+ if (setup->reconfigure) {
+ g_timeout_add(RECONFIGURE_TIMEOUT, a2dp_reconfigure, setup);
+ return;
+ }
+
setup_unref(setup);
}
err = avdtp_close(chan->session, tmp->stream, FALSE);
if (err < 0) {
- error("avdtp_close: %s", strerror(-err));
- goto fail;
+ err = avdtp_abort(chan->session, tmp->stream);
+ if (err < 0) {
+ error("avdtp_abort: %s",
+ strerror(-err));
+ goto fail;
+ }
}
setup->reconfigure = TRUE;