Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=TheThingsNetwork
version=2.5.2
version=2.5.3
author=The Things Network
maintainer=Johan Stokking <johan@thethingsnetwork.org>
sentence=The Things Network Arduino Library.
Expand Down
4 changes: 3 additions & 1 deletion src/TheThingsNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,12 @@ bool TheThingsNetwork::provision(const char *appEui, const char *appKey)

bool TheThingsNetwork::join(int8_t retries, uint32_t retryDelay)
{
int8_t attempts = 0;
configureChannels(fsb);
setSF(sf);
while (retries == -1 || retries-- >= 0)
while (retries == -1 || attempts <= retries)
{
attempts++;
if (!sendJoinSet(MAC_JOIN_MODE_OTAA))
{
debugPrintMessage(ERR_MESSAGE, ERR_JOIN_FAILED);
Expand Down