• Yuwei Huang's avatar
    [CRD iOS] Fix crashes when session disconnects · 0d0f9b5a
    Yuwei Huang authored
    We are still seeing quite a few crashes happen when session disconnects
    remotely. Here are two issues that I have found:
    
    * It turns out calling WeakPtrFactory::InvalidateWeakPtrs() only
      invalidate WeakPtrs that are currently created, while calling
      WeakPtrFactory::GetWeakPtr() again will create new valid WeakPtrs.
    * ChromotingClient owns IceTransport, which runs a timer to periodically
      send pending transport messages. The timer should be stopped
      immediately after the session is disconnected, so we need to
      immediately destroy the ChromotingClient instance in this case.
    
    Bug: 840492
    Change-Id: I6625af62001b0cdfb5745dcc863ed59617e440cf
    Reviewed-on: https://chromium-review.googlesource.com/1170174
    Commit-Queue: Yuwei Huang <yuweih@chromium.org>
    Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#582771}
    0d0f9b5a
chromoting_session.h 6.18 KB