Skip to content

Commit 35fb35a

Browse files
author
Cruz Monrreal
authored
Merge pull request #7661 from EnsilicaEdd/fix_lorawan_incomplete_connect
Clear CONN_IN_PROGRESS flag after incomplete connect()
2 parents 4cab24f + 88b2858 commit 35fb35a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ void LoRaWANStack::process_shutdown_state(lorawan_status_t &op_status)
10821082
_device_current_state = DEVICE_STATE_SHUTDOWN;
10831083
op_status = LORAWAN_STATUS_DEVICE_OFF;
10841084
_ctrl_flags &= ~CONNECTED_FLAG;
1085+
_ctrl_flags &= ~CONN_IN_PROGRESS_FLAG;
10851086
send_event_to_application(DISCONNECTED);
10861087
}
10871088

@@ -1162,6 +1163,7 @@ void LoRaWANStack::process_joining_state(lorawan_status_t &op_status)
11621163
bool can_continue = _loramac.continue_joining_process();
11631164

11641165
if (!can_continue) {
1166+
_ctrl_flags &= ~CONN_IN_PROGRESS_FLAG;
11651167
send_event_to_application(JOIN_FAILURE);
11661168
_device_current_state = DEVICE_STATE_IDLE;
11671169
return;

0 commit comments

Comments
 (0)