Fix failing DCHECKs in JingleSession added in r294653
commitd04beefcfe9d886bd0938ce409b2236482c6c1b8
authorsergeyu <sergeyu@chromium.org>
Tue, 16 Sep 2014 20:24:00 +0000 (16 13:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 16 Sep 2014 20:24:46 +0000 (16 20:24 +0000)
tree2be2eeefe0366169127f15c3e79a22ecfa1bace8
parentbef0b9045da427c4f2212a5aeb0a878eddee0edc
Fix failing DCHECKs in JingleSession added in r294653

r294653 added two DCHECKs in JingleSession in CancelChannelCreation()
and destructor. These checks were failing in the client sometimes. This
CL fixes the code that was causing them to fail:
 1. The ChannelMultiplexer needs to be destroyed explicitly in the
    destructor.
 2. ChannelDispatcherBase was calling CancelChannelCreation() even
    after the channel is created.

Review URL: https://codereview.chromium.org/571273003

Cr-Commit-Position: refs/heads/master@{#295138}
remoting/protocol/channel_dispatcher_base.cc
remoting/protocol/jingle_session.cc