Skip to content

Commit

Permalink
bluetooth: conn: Fix bt_gatt_connected call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MarekPieta authored and carlescufi committed Apr 16, 2019
1 parent bf71aee commit 51b45f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion subsys/bluetooth/host/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 51b45f0

Please sign in to comment.