| Index: remoting/protocol/webrtc_transport.cc
|
| diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc
|
| index ac3b6b32398af1d83681118b97f228692b22d623..a3943f8d5d91c1dac48d7587d988b424e718f9fd 100644
|
| --- a/remoting/protocol/webrtc_transport.cc
|
| +++ b/remoting/protocol/webrtc_transport.cc
|
| @@ -154,7 +154,10 @@ WebrtcTransport::~WebrtcTransport() {}
|
|
|
| std::unique_ptr<MessagePipe> WebrtcTransport::CreateOutgoingChannel(
|
| const std::string& name) {
|
| - return data_stream_adapter_->CreateOutgoingChannel(name);
|
| + webrtc::DataChannelInit config;
|
| + config.reliable = true;
|
| + return base::WrapUnique(new WebrtcDataStreamAdapter(
|
| + peer_connection_->CreateDataChannel(name, &config)));
|
| }
|
|
|
| void WebrtcTransport::Start(
|
| @@ -197,8 +200,6 @@ void WebrtcTransport::Start(
|
| peer_connection_ = peer_connection_factory_->CreatePeerConnection(
|
| rtc_config, &constraints, std::move(port_allocator), nullptr, this);
|
|
|
| - data_stream_adapter_.reset(new WebrtcDataStreamAdapter(peer_connection_));
|
| -
|
| event_handler_->OnWebrtcTransportConnecting();
|
|
|
| if (transport_context_->role() == TransportRole::SERVER)
|
| @@ -439,7 +440,7 @@ void WebrtcTransport::OnDataChannel(
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| event_handler_->OnWebrtcTransportIncomingDataChannel(
|
| data_channel->label(),
|
| - data_stream_adapter_->WrapIncomingDataChannel(data_channel));
|
| + base::WrapUnique(new WebrtcDataStreamAdapter(data_channel)));
|
| }
|
|
|
| void WebrtcTransport::OnRenegotiationNeeded() {
|
| @@ -574,8 +575,6 @@ void WebrtcTransport::Close(ErrorCode error) {
|
|
|
| weak_factory_.InvalidateWeakPtrs();
|
|
|
| - data_stream_adapter_.reset();
|
| -
|
| peer_connection_->Close();
|
| peer_connection_ = nullptr;
|
| peer_connection_factory_ = nullptr;
|
|
|