• sergeyu's avatar
    Don't start PseudoTCP until underlying transport is connect. · bf00a436
    sergeyu authored
    Previously LibjingleTransportFactory was creating and returning
    transport before the transport is connected. This means that that the
    PseudoTCP was trying to start handshake on a broken transport. That was
    delaying PseudoTCP/SSL when the transport takes some time to setup
    (e.g. over STUN/Relay). Now LibjingleTransportFactory returns the
    transport only after it becomes writable. Empirical testing shows that
    this change makes connection initiation much faster in cases when NAT
    traversal is required (4 vs 10 seconds).
    
    Review URL: https://codereview.chromium.org/587943002
    
    Cr-Commit-Position: refs/heads/master@{#295862}
    bf00a436
libjingle_transport_factory.cc 12.7 KB