'Store outgoing stanzas in a queue to be acked.'

def _handle_outgoing(self, stanza):

    if (not self.enabled.is_set()):
        return stanza
    if isinstance(stanza, (Message, Presence, Iq)):
        seq = None
        with self.seq_lock:
            self.seq = ((self.seq + 1) % MAX_SEQ)
            seq = self.seq
        self.unacked_queue.append((seq, stanza))
        with self.window_counter_lock:
            self.window_counter -= 1
            if (self.window_counter == 0):
                self.window_counter = self.window
                self.request_ack()
    return stanza
