diff --git a/audio/manager.c b/audio/manager.c
index f15893d..67941ac 100644
--- a/audio/manager.c
+++ b/audio/manager.c
if (add_record_to_server(&src, record) < 0) {
error("Unable to register HFP HS service record");
sdp_record_free(record);
+ g_io_channel_shutdown(adapter->hfp_hs_server, TRUE, NULL);
g_io_channel_unref(adapter->hfp_hs_server);
adapter->hfp_hs_server = NULL;
return -1;
}
if (adp->hfp_hs_server) {
+ g_io_channel_shutdown(adp->hfp_hs_server, TRUE, NULL);
g_io_channel_unref(adp->hfp_hs_server);
adp->hfp_hs_server = NULL;
}