Changeset 374:a505684c3723 for src


Ignore:
Timestamp:
12/18/12 10:14:19 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added guard against flooding the web handler with ACARS sending request in case of a network problem (#155)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r366 r374  
    111111        self._gui = gui
    112112        self._lastSent = None
     113        self._sending = False
    113114
    114115    def check(self, flight, aircraft, logger, oldState, state):
    115116        """If the time has come to send the ACARS, send it."""
     117        if self._sending:
     118            return
     119
    116120        now = time.time()
    117121
     
    131135        else:
    132136            print "Failed to send the ACARS"
     137        self._sending = False
    133138
    134139#---------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.