def METHOD_NAME(self, item):
    """
    Put an item back into the pool, when done.  This may cause the putting thread to block.
    """
    with self.lock:
        discard = self.current_size > self.max_size
        if discard:
            self.current_size -= 1
    if not discard:
        try:
            self.channel.METHOD_NAME(item, block=False)
            return
        except Full:
            discard = True
    if discard:
        try:
            item.disconnect()
        except Exception as ex:
            # failed to disconnect the mediator, delete the stale client.
            logger.error(
                "Failed to disconnect the connection for storage {} after use, "
                "reason is {}".format(self.endpoint_key, ex)
            )
            del item