bluetooth: conn: Fix bt_gatt_connected call
bt_gatt_connected should be only called, when there is no connection error. Change fixes problem with receiving notifications before connection. Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
This commit is contained in:
parent
bf71aee8e4
commit
51b45f0df6
1 changed files with 3 additions and 1 deletions
|
@ -138,7 +138,9 @@ static void notify_connected(struct bt_conn *conn)
|
|||
}
|
||||
}
|
||||
|
||||
bt_gatt_connected(conn);
|
||||
if (!conn->err) {
|
||||
bt_gatt_connected(conn);
|
||||
}
|
||||
}
|
||||
|
||||
static void notify_disconnected(struct bt_conn *conn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue