mirror of https://github.com/ARMmbed/mbed-os.git
Adjust Thread interface connect timeout
Thread device needs to wait for connectivity: -routers will create new network and get local connectivity -end device will get connectivity once attached to existing network -devices without network settings gets connectivity once commissioned and attached to networkpull/4333/head
parent
0a3b2561bc
commit
28a6fa1819
|
@ -39,7 +39,11 @@ int ThreadInterface::connect()
|
||||||
// Release mutex before blocking
|
// Release mutex before blocking
|
||||||
nanostack_unlock();
|
nanostack_unlock();
|
||||||
|
|
||||||
int32_t count = connect_semaphore.wait(30000);
|
// In Thread wait connection for ever:
|
||||||
|
// -routers will create new network and get local connectivity
|
||||||
|
// -end devices will get connectivity once attached to existing network
|
||||||
|
// -devices without network settings gets connectivity once commissioned and attached to network
|
||||||
|
int32_t count = connect_semaphore.wait(osWaitForever);
|
||||||
|
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
return NSAPI_ERROR_DHCP_FAILURE; // sort of...
|
return NSAPI_ERROR_DHCP_FAILURE; // sort of...
|
||||||
|
|
Loading…
Reference in New Issue