Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 03f466a

Browse files
author
Antti Yli-Tokola
authored
Merge pull request #273 from ARMmbed/reg_fix_after_bs
Fix first time registration after bootstrap
2 parents 47a2eea + fc2692e commit 03f466a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/m2minterfaceimpl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,9 @@ void M2MInterfaceImpl::state_bootstrapped( EventData */*data*/)
635635
{
636636
#ifndef MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE
637637
tr_debug("M2MInterfaceImpl::state_bootstrapped");
638+
_connection_handler->stop_listening();
639+
_listen_port = rand() % 64511 + 1024;
640+
_connection_handler->bind_connection(_listen_port);
638641
#endif //MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE
639642
}
640643

0 commit comments

Comments
 (0)