Skip to content

Commit e5c9080

Browse files
recreate the queue for every run
1 parent 8060fdf commit e5c9080

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BLE_Privacy/source/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,15 +543,16 @@ bool PrivacyDevice::_seeded = false;
543543
int main()
544544
{
545545
BLE& ble = BLE::Instance();
546-
events::EventQueue queue;
547546

548547
while(1) {
549548
{
549+
events::EventQueue queue;
550550
printf("\r\n * Device is a peripheral *\r\n\r\n");
551551
PrivacyPeripheral peripheral(ble, queue);
552552
peripheral.run();
553553
}
554554
{
555+
events::EventQueue queue;
555556
printf("\r\n * Device is a central *\r\n\r\n");
556557
PrivacyCentral central(ble, queue);
557558
central.run();

0 commit comments

Comments
 (0)