def __init__(self, hass, restrict_origin=None):
        self.hass = hass
        self.restrict_origin = restrict_origin

        # We use a tuple (host, port) as key to ensure
        # that we do not forward to the same host twice
        self._targets = {}

        self._lock = threading.Lock()
Initalize the event forwarder.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/remote.py/EventForwarder.__init__