Changeset 1070:6df48aba546b for src/mlx


Ignore:
Timestamp:
12/24/22 08:39:07 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Only non-periodic requests are put back into the queue on connection failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/xplane.py

    r1067 r1070  
    575575            self._connected = False
    576576
    577     def _processRequest(self, request, time, attempts):
     577    def _processRequest(self, request, time, attempts, isPeriodic):
    578578        """Process the given request.
    579579
     
    605605            if needReconnect:
    606606                with self._requestCondition:
    607                     self._requests.insert(0, request)
     607                    if not isPeriodic:
     608                        self._requests.insert(0, request)
    608609                self._disconnect()
    609610                return self._connect(autoReconnection = True, attempts = attempts)
     
    628629                break
    629630
    630             attempts = self._processRequest(request, t, attempts)
     631            attempts = self._processRequest(request, t, attempts, True)
    631632
    632633        while self._connectionRequested and self._requests:
     
    634635            del self._requests[0]
    635636
    636             attempts = self._processRequest(request, None, attempts)
     637            attempts = self._processRequest(request, None, attempts, False)
    637638
    638639        return self._connectionRequested
Note: See TracChangeset for help on using the changeset viewer.