Index: trunk/BNC/test_bnc_qt.cpp
===================================================================
--- trunk/BNC/test_bnc_qt.cpp	(revision 600)
+++ trunk/BNC/test_bnc_qt.cpp	(revision 601)
@@ -90,6 +90,4 @@
 
   while (true) {
-    bool somethingRead = false;
-
     if (socketObs.state() != QAbstractSocket::ConnectedState) {
       cout << "socketObs: disconnected" << endl;
@@ -102,5 +100,4 @@
 
     if ( socketObs.bytesAvailable() ) {
-      somethingRead = true;
       int bytesRecv = socketObs.read(&flag, 1);
       if (flag == begObs) {
@@ -124,13 +121,14 @@
       }
     }
+    else {
+      socketObs.waitForReadyRead(50);
+    }
 
     if ( socketEph.bytesAvailable() ) {
-      somethingRead = true;
       QByteArray eph = socketEph.readAll();
       outEph << eph.data() << endl;
     }
-
-    if (!somethingRead) {
-      socketObs.waitForReadyRead(100);
+    else {
+      socketEph.waitForReadyRead(50);
     }
   }
