net: bt: Disconnect in case of errors sending a packet
Packets shall never fail to be sent now that they are queued, so if an error occured there is no point in keep the channel connected. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
cf84216b1a
commit
f93de735d2
|
@ -114,6 +114,8 @@ static int net_bt_send(struct net_if *iface, struct net_pkt *pkt)
|
|||
|
||||
ret = bt_l2cap_chan_send(&conn->ipsp_chan.chan, buffer);
|
||||
if (ret < 0) {
|
||||
NET_ERR("Unable to send packet: %d", ret);
|
||||
bt_l2cap_chan_disconnect(&conn->ipsp_chan.chan);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue