def message_received(self, receiver, message, handle):
        now = time.time()
        receiver.message_accepted(handle)
        self.tx_total_latency += now - message.body['tx-timestamp']
        self.receives += 1
        if self._count:
            self._count -= 1
            if self._count == 0:
                receiver.close()
                return
        lc = receiver.capacity
        cap = self._capacity
        if lc < (cap / 2):
            receiver.add_capacity(cap - lc)