Diff between c009be5c5973eeef7783903ec02e359d5b035654 and fa1f2e5ee14dd740293fc5f491816cb185c6e7d7

Changed Files

File Additions Deletions Status
profiles/audio/sink.c +5 -0 modified

Full Patch

diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index a547dcb..77f1954 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
@@ -137,6 +137,11 @@ static void stream_state_changed(struct avdtp_stream *stream,
 	case AVDTP_STATE_IDLE:
 		btd_service_disconnecting_complete(sink->service, 0);
 
+		if (sink->connect_id > 0) {
+			a2dp_cancel(sink->connect_id);
+			sink->connect_id = 0;
+		}
+
 		if (sink->disconnect_id > 0) {
 			a2dp_cancel(sink->disconnect_id);
 			sink->disconnect_id = 0;