diff --git a/services/audioflinger/ISchedulingPolicyService.cpp b/services/audioflinger/ISchedulingPolicyService.cpp
index 0079968..f55bc02 100644
--- a/services/audioflinger/ISchedulingPolicyService.cpp
+++ b/services/audioflinger/ISchedulingPolicyService.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "SchedulingPolicyService"
+#define LOG_TAG "ISchedulingPolicyService"
 //#define LOG_NDEBUG 0
 
 #include <binder/Parcel.h>
@@ -45,9 +45,17 @@
         data.writeInt32(tid);
         data.writeInt32(prio);
         uint32_t flags = asynchronous ? IBinder::FLAG_ONEWAY : 0;
-        remote()->transact(REQUEST_PRIORITY_TRANSACTION, data, &reply, flags);
-        // fail on exception
-        if (reply.readExceptionCode() != 0) return -1;
+        status_t status = remote()->transact(REQUEST_PRIORITY_TRANSACTION, data, &reply, flags);
+        if (status != NO_ERROR) {
+            return status;
+        }
+        if (asynchronous) {
+            return NO_ERROR;
+        }
+        // fail on exception: force binder reconnection
+        if (reply.readExceptionCode() != 0) {
+            return DEAD_OBJECT;
+        }
         return reply.readInt32();
     }
 };
diff --git a/services/audioflinger/SchedulingPolicyService.cpp b/services/audioflinger/SchedulingPolicyService.cpp
index 36e62e9..70a3f1a 100644
--- a/services/audioflinger/SchedulingPolicyService.cpp
+++ b/services/audioflinger/SchedulingPolicyService.cpp
@@ -14,6 +14,9 @@
  * limitations under the License.
  */
 
+#define LOG_TAG "SchedulingPolicyService"
+//#define LOG_NDEBUG 0
+
 #include <binder/IServiceManager.h>
 #include <utils/Mutex.h>
 #include "ISchedulingPolicyService.h"
@@ -28,25 +31,32 @@
 int requestPriority(pid_t pid, pid_t tid, int32_t prio, bool asynchronous)
 {
     // FIXME merge duplicated code related to service lookup, caching, and error recovery
-    sp<ISchedulingPolicyService> sps;
+    int ret;
     for (;;) {
         sMutex.lock();
-        sps = sSchedulingPolicyService;
+        sp<ISchedulingPolicyService> sps = sSchedulingPolicyService;
         sMutex.unlock();
-        if (sps != 0) {
-            break;
-        }
-        sp<IBinder> binder = defaultServiceManager()->checkService(_scheduling_policy);
-        if (binder != 0) {
+        if (sps == 0) {
+            sp<IBinder> binder = defaultServiceManager()->checkService(_scheduling_policy);
+            if (binder == 0) {
+                sleep(1);
+                continue;
+            }
             sps = interface_cast<ISchedulingPolicyService>(binder);
             sMutex.lock();
             sSchedulingPolicyService = sps;
             sMutex.unlock();
+        }
+        ret = sps->requestPriority(pid, tid, prio, asynchronous);
+        if (ret != DEAD_OBJECT) {
             break;
         }
-        sleep(1);
+        ALOGW("SchedulingPolicyService died");
+        sMutex.lock();
+        sSchedulingPolicyService.clear();
+        sMutex.unlock();
     }
-    return sps->requestPriority(pid, tid, prio, asynchronous);
+    return ret;
 }
 
 }   // namespace android
