Closed hjdivad closed 11 years ago
We probably need to remove temporarily the listeners in MessageChannel.encodeEvent
like we do for the _currentTarget
https://github.com/tildeio/MessageChannel.js/blob/master/lib/message_channel.js#L238
This happens because you don't transfer the port. Otherwise the listener would be attached to the port in the other user agent.
@Cyril-sf I know, but that's a bug in the near-poly. You don't have to transfer the port.
@hjdivad confirm
This is because we try to encode the target port when sending a message. From what I can tell,
_getPort
is used both for transferring ports and to indicate the proper recipient of a message.In the former case we need the uuid, entangled uuid and message queue. In the latter case, we really only need the uuid of the recipient.
cc @Cyril-sf