You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible that the transport passed into sender.setTransport dies just moments before the setTransport is called unknown to the app developer (e.g. DTLS asynchronously failed to negotiate). Thus the setTransport would throw an exception because the passed in transport is dead. The programmer would NOT have received the transport state change and thus would be unaware anything went wrong in advance and could not substitute an alternative transport before the promise is fulfilled upon receiving the state change event (and thus disregard any setTransport exceptions due to failed states that are not relevant).
The text was updated successfully, but these errors were encountered:
sender.setTransport should not have dependency on the state of the transport, which is expected to change dynamically. We should not expect setTransport to throw exception, therefore there is no need to change the call to promise-based. It should be kept consistent with the sender constructor logic.
The (proposed) promise could make the app more complicated if there are two places to handle the transport.state. Handling the transport object with the transport.onstatechange should be sufficient.
It's possible that the transport passed into
sender.setTransport
dies just moments before thesetTransport
is called unknown to the app developer (e.g. DTLS asynchronously failed to negotiate). Thus thesetTransport
would throw an exception because the passed intransport
is dead. The programmer would NOT have received thetransport
state change and thus would be unaware anything went wrong in advance and could not substitute an alternative transport before the promise is fulfilled upon receiving the state change event (and thus disregard any setTransport exceptions due to failed states that are not relevant).The text was updated successfully, but these errors were encountered: