def _check_last_recv_timestamps(self):
        now = time.time()

        def is_stale(conn):
            timestamp = conn.last_recv_timestamp
            return (now - timestamp) > ((conn.heartbeat_interval * 2) / 1000.0)

        # first get the list of stale connections, then close
        # (`conn.close()` may modify the list of connections while we're iterating)
        stale_connections = [conn for conn in self.conns.values() if is_stale(conn)]
        for conn in stale_connections:
            timestamp = conn.last_recv_timestamp
            # this connection hasnt received data for more than
            # the configured heartbeat interval, close it
            logger.warning('[%s:%s] connection is stale (%.02fs), closing',
                           conn.id, self.name, (timestamp - now))
            conn.close()
dataset/ETHPy150Open nsqio/pynsq/nsq/client.py/Client._check_last_recv_timestamps/swapped operands of `-`