--- a/mpd2src/mpd2sc.cpp
+++ b/mpd2src/mpd2sc.cpp
@@ -65,6 +65,16 @@
 using namespace OpenHome::Net;
 using namespace OpenHome::TestFramework;
 using namespace OpenHome::Av;
+
+
+// Sig catcher so that we can interrupt the pause() which will be
+// waiting for playing to end. Also set a flag for the benefit of busyRdWr()
+bool g_quitrequest = false;
+void sigcatcher(int)
+{
+    LOGDEB("sigcatcher\n");
+    g_quitrequest = true;
+}
 
 class PcmSender {
 
@@ -218,8 +228,14 @@
 {
     LOGDEB("PcmSender:busyRdWr: packetbytes " << iPacketBytes << endl);
     while (true) {
+        if (g_quitrequest) {
+            return;
+        }
         const unsigned char *cp = m_audio->data((size_t)iPacketBytes);
         if (cp == 0) {
+            return;
+        }
+        if (g_quitrequest) {
             return;
         }
         iDriver->SendAudio(cp, iPacketBytes);
@@ -314,13 +330,6 @@
     delete (iDriver);
 }
 
-// Sig catcher so that we can interrupt the pause() which will be waiting
-// for playing to end
-void sigcatcher(int)
-{
-    LOGDEB("sigcatcher\n");
-}
-
 int main(int aArgc, char* aArgv[])
 {
     OptionParser parser;