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:
Marek Pieta 2019-04-16 15:01:19 +02:00 committed by Carles Cufí
commit 51b45f0df6

View file

@ -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)