custom for >5 resources
Fork of mbedConnectorInterface by
Diff: api/ThreadedResourceObserver.cpp
- Revision:
- 36:1c6c45584c13
- Parent:
- 31:bacc63106754
- Child:
- 43:769d491a48c1
diff -r f12e61aaf004 -r 1c6c45584c13 api/ThreadedResourceObserver.cpp --- a/api/ThreadedResourceObserver.cpp Wed Apr 08 23:03:39 2015 +0000 +++ b/api/ThreadedResourceObserver.cpp Thu Apr 09 03:32:11 2015 +0000 @@ -45,7 +45,7 @@ ThreadedResourceObserver *me = (ThreadedResourceObserver *)instance; while(true) { Thread::wait(me->getSleepTime()); - if (me->isObserving() == true && me->getResource() != NULL) { + if (me->isObserving() == true && me->getResource() != NULL && nsdl_endpoint_is_registered() == true) { me->getResource()->observe(); } }