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

Fix first time registration after bootstrap #273

Merged
merged 1 commit into from
Aug 11, 2016
Merged
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
3 changes: 3 additions & 0 deletions source/m2minterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,9 @@ void M2MInterfaceImpl::state_bootstrapped( EventData */*data*/)
{
#ifndef MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE
tr_debug("M2MInterfaceImpl::state_bootstrapped");
_connection_handler->stop_listening();
_listen_port = rand() % 64511 + 1024;
_connection_handler->bind_connection(_listen_port);
#endif //MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE
}

Expand Down