def __init__(self, main):
        self.main = main
        self.remap_ip = None

        self.choke_time = seconds() - self.CHOKE_PERIOD
        self.choke_reported = seconds() - 999

        # True iff we're shutting down after a socket failure.
        self.stopping_protocol = False