Index: trunk/BNC/bnccaster.cpp
===================================================================
--- trunk/BNC/bnccaster.cpp	(revision 135)
+++ trunk/BNC/bnccaster.cpp	(revision 136)
@@ -58,4 +58,8 @@
   QSettings settings;
   _samplingRate = settings.value("rnxSampl").toInt();
+  _waitTime     = settings.value("waitTime").toInt();
+  if (_waitTime < 2) {
+    _waitTime = 2;
+  }
 }
 
@@ -109,7 +113,6 @@
   // Dump older epochs
   // -----------------
-  const long waitTime = 2;
-  dumpEpochs(_lastDumpSec + 1, newTime - waitTime);
-  _lastDumpSec = newTime - waitTime;
+  dumpEpochs(_lastDumpSec + 1, newTime - _waitTime);
+  _lastDumpSec = newTime - _waitTime;
 }
 
Index: trunk/BNC/bnccaster.h
===================================================================
--- trunk/BNC/bnccaster.h	(revision 135)
+++ trunk/BNC/bnccaster.h	(revision 136)
@@ -49,4 +49,5 @@
    QMap<QString, bncRinex*>       _rinexWriters;
    int                            _samplingRate;
+   long                           _waitTime;
 };
 
Index: trunk/BNC/bncgetthread.cpp
===================================================================
--- trunk/BNC/bncgetthread.cpp	(revision 135)
+++ trunk/BNC/bncgetthread.cpp	(revision 136)
@@ -28,13 +28,13 @@
 using namespace std;
 
-const int timeOut = 300*1000;
-
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
 bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format) {
+  _decoder    = 0;
   _mountPoint = mountPoint;
   _staID      = mountPoint.path().mid(1).toAscii();
   _format     = format;
   _socket     = 0;
+  _timeOut    = 10*1000;  // 10 seconds
 }
 
@@ -43,9 +43,11 @@
 bncGetThread::~bncGetThread() {
   delete _socket;
+  delete _decoder;
 }
 
 // Connect to Caster, send the Request (static)
 ////////////////////////////////////////////////////////////////////////////
-QTcpSocket* bncGetThread::request(const QUrl& mountPoint, QString& msg) {
+QTcpSocket* bncGetThread::request(const QUrl& mountPoint, int timeOut, 
+                                  QString& msg) {
 
   // Connect the Socket
@@ -98,7 +100,7 @@
 }
 
-// Run
+// Init Run
 ////////////////////////////////////////////////////////////////////////////
-void bncGetThread::run() {
+void bncGetThread::initRun() {
 
   // Send the Request
@@ -106,5 +108,5 @@
   QString msg;
 
-  _socket = bncGetThread::request(_mountPoint, msg);
+  _socket = bncGetThread::request(_mountPoint, _timeOut, msg);
 
   emit(newMessage(msg.toAscii()));
@@ -116,5 +118,5 @@
   // Read Caster Response
   // --------------------
-  _socket->waitForReadyRead(timeOut);
+  _socket->waitForReadyRead(_timeOut);
   if (_socket->canReadLine()) {
     QString line = _socket->readLine();
@@ -131,45 +133,51 @@
   // Instantiate the filter
   // ----------------------
-  GPSDecoder* decoder;
+  if (!_decoder) { 
+    if      (_format.indexOf("RTCM_2") != -1) {
+      emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format"));
+      _decoder = new RTCM('A',true);
+    }
+    else if (_format.indexOf("RTCM_3") != -1) {
+      emit(newMessage("Get Data: " + _staID + " in RTCM 3.0 format"));
+      _decoder = new rtcm3();
+    }
+    else if (_format.indexOf("RTIGS") != -1) {
+      emit(newMessage("Get Data: " + _staID + " in RTIGS format"));
+      _decoder = new rtigs();
+    }
+    else {
+      emit(newMessage(_staID + " Unknown data format " + _format));
+      return exit(1);
+    }
+  }
+}
 
-  if      (_format.indexOf("RTCM_2") != -1) {
-    emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format"));
-    decoder = new RTCM('A',true);
-  }
-  else if (_format.indexOf("RTCM_3") != -1) {
-    emit(newMessage("Get Data: " + _staID + " in RTCM 3.0 format"));
-    decoder = new rtcm3();
-  }
-  else if (_format.indexOf("RTIGS") != -1) {
-    emit(newMessage("Get Data: " + _staID + " in RTIGS format"));
-    decoder = new rtigs();
-  }
-  else {
-    emit(newMessage(_staID + " Unknown data format " + _format));
-    return exit(1);
-  }
+// Run
+////////////////////////////////////////////////////////////////////////////
+void bncGetThread::run() {
+
+  initRun();
 
   // Read Incoming Data
   // ------------------
   while (true) {
-    _socket->waitForReadyRead(timeOut);
+    _socket->waitForReadyRead(_timeOut);
     qint64 nBytes = _socket->bytesAvailable();
     if (nBytes > 0) {
       char* data = new char[nBytes];
       _socket->read(data, nBytes);
-      decoder->Decode(data, nBytes);
+      _decoder->Decode(data, nBytes);
       delete data;
-      for (list<Observation*>::iterator it = decoder->m_lObsList.begin(); 
-           it != decoder->m_lObsList.end(); it++) {
+      for (list<Observation*>::iterator it = _decoder->m_lObsList.begin(); 
+           it != _decoder->m_lObsList.end(); it++) {
         emit newObs(_staID, *it);
       }
-      decoder->m_lObsList.clear();
+      _decoder->m_lObsList.clear();
     }
     else {
-      emit(newMessage("Data Timeout"));
-      return exit(1);
+      emit(newMessage("Data Timeout, reconnecting"));
+      tryReconnect();
     }
   }
-  delete decoder;
 }
 
@@ -183,2 +191,7 @@
 }
 
+// Try Re-Connect 
+////////////////////////////////////////////////////////////////////////////
+void bncGetThread::tryReconnect() {
+
+}
Index: trunk/BNC/bncgetthread.h
===================================================================
--- trunk/BNC/bncgetthread.h	(revision 135)
+++ trunk/BNC/bncgetthread.h	(revision 136)
@@ -16,5 +16,5 @@
 
    static QTcpSocket* bncGetThread::request(const QUrl& mountPoint,
-                                            QString& msg);
+                                            int timeOut, QString& msg);
 
    QByteArray staID() const {return _staID;}
@@ -28,10 +28,14 @@
    virtual void run();
  private:
+   void initRun();
+   void tryReconnect();
    void message(const QString&);
    void exit(int exitCode = 0);
+   GPSDecoder* _decoder;
    QTcpSocket* _socket;
    QUrl        _mountPoint;
    QByteArray  _staID;
    QByteArray  _format;
+   int         _timeOut;
 };
 
Index: trunk/BNC/bnctabledlg.cpp
===================================================================
--- trunk/BNC/bnctabledlg.cpp	(revision 135)
+++ trunk/BNC/bnctabledlg.cpp	(revision 136)
@@ -94,6 +94,7 @@
   // Send the Request
   // ----------------
+  const int timeOut = 10*1000;
   QString msg;
-  QTcpSocket* socket = bncGetThread::request(url, msg);
+  QTcpSocket* socket = bncGetThread::request(url, timeOut, msg);
 
   if (!socket) {
@@ -126,5 +127,4 @@
     }
     else {
-      const int timeOut = 10*1000;
       socket->waitForReadyRead(timeOut);
       if (socket->bytesAvailable() > 0) {
