From d274497e3c01f160f5bcd1bd4d13f7638cb3477e Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Wed, 31 Jul 2019 12:11:04 -0400 Subject: bluez: unset sco and rfcomm fd when destroying transport --- spa/plugins/bluez5/bluez5-monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/bluez5-monitor.c b/spa/plugins/bluez5/bluez5-monitor.c index 7f22d65d..b101592f 100644 --- a/spa/plugins/bluez5/bluez5-monitor.c +++ b/spa/plugins/bluez5/bluez5-monitor.c @@ -1644,12 +1644,14 @@ static int sco_destroy_cb(void *data) spa_loop_remove_source(td->sco.loop, &td->sco); shutdown(td->sco.fd, SHUT_RDWR); close (td->sco.fd); + td->sco.fd = -1; } if (td->rfcomm.data) { if (td->rfcomm.loop) spa_loop_remove_source(td->rfcomm.loop, &td->rfcomm); shutdown(td->rfcomm.fd, SHUT_RDWR); close (td->rfcomm.fd); + td->rfcomm.fd = -1; } return 0; } -- cgit v1.2.3