Changeset 10960 in ntrip for trunk


Ignore:
Timestamp:
Jul 27, 2026, 1:43:45 PM (9 days ago)
Author:
stuerze
Message:

A timeout is added to allow a reonnect after an outage of Ntrip Version 2/2s streams

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/CHANGELOG.md

    r10957 r10960  
    1010- FIXED: Handling of ionospheric constraints [(#220)](https://software.rtcm-ntrip.org/ticket/220)
    1111- FIXED: SP3/Clock RINEX clock values produced by the Upload Corrections feature no longer depend on whether 'Center of Mass' is ticked, since that setting should only affect the uploaded SSR Broadcast Correction stream [(#210)](https://software.rtcm-ntrip.org/ticket/210)
     12- FIXED: A timeout is added to allow a reonnect after an outage of Ntrip Version 2/2s streams
    1213- CHANGED: prevention to extrapolate a orb/clk SSR correction far beyond its own declared update interval
    1314- CHANGED: GLONASS postion integration fresh from the pristine, decoded TOC state rather than rolling _tt/_xv forward across repeated calls
  • trunk/BNC/src/bncnetqueryv2.cpp

    r10802 r10960  
    1616
    1717#include <iostream>
     18
     19#include <QTimer>
    1820
    1921#include "bncnetqueryv2.h"
     
    3436  _firstData = true;
    3537  _status    = init;
     38  _timeOut   = 20000;
    3639
    3740  bncSettings settings;
     
    215218  // Wait Loop
    216219  // ---------
     220  bool timedOut = false;
    217221  if (!_reply->bytesAvailable()) {
     222    QTimer timer;
     223    timer.setSingleShot(true);
     224    connect(&timer, SIGNAL(timeout()), _eventLoop, SLOT(quit()));
     225    timer.start(_timeOut);
    218226    _eventLoop->exec();
     227    timedOut = !timer.isActive();
    219228  }
    220229  if (!_reply) {
     230    return;
     231  }
     232
     233  // Timeout: neither new data arrived nor did the request finish
     234  // (e.g. connection silently dropped by a NAT/firewall)
     235  // --------------------------------------------------------------
     236  if (timedOut) {
     237    _status = error;
     238    emit newMessage(_url.path().toLatin1().replace(0,1,"")
     239                    + ": Read timeout", true);
     240    disconnect(_reply, SIGNAL(finished()), this, SLOT(slotFinished()));
     241    _reply->abort();
    221242    return;
    222243  }
Note: See TracChangeset for help on using the changeset viewer.