mbed Connector Interface simplification API on top of mbed-client

Fork of mbedConnectorInterfaceV3 by Doug Anson

NOTE:

This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!

Revision:
13:9edad7677211
Parent:
0:1f1f55e73248
Child:
16:dffa38c3340f
diff -r d0e61bac8c27 -r 9edad7677211 source/ThreadedResourceObserver.cpp
--- a/source/ThreadedResourceObserver.cpp	Thu Mar 10 16:02:04 2016 +0000
+++ b/source/ThreadedResourceObserver.cpp	Wed Jun 08 22:32:08 2016 +0000
@@ -53,7 +53,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 && me->getResource()->isConnected() == true) {
              //
              // implementsObservation(): This switch denotes whether this threaded resource generates its own observations or relies on the heartbeat (time-based) mechanism.
              //   -- if resource itself doesn't implement it, then we can call notify() with the get() on each heartbeat of the threaded resource (see note below)