[remoting][FTL] Only delay signal strategy destruction in mobile clients
FtlSignalStrategy deletes underlying messaging client and other members with a 5-second delay to allow session-terminate message to be sent after deleting the signal strategy. The current implementation doesn't work well at shutdown. When the sequence itself is being deleted, all pending tasks will be deleted on an arbitrary thread. This will cause a race condition in gRPC executor since it tries to delete unique_ptrs bound into the closure. Unlike CL 1692736 This CL provides a different way to solve this issue. Currently only mobile clients use short-lived FtlSignalStrategy, so this CL moves the delay destruction logic into ChromotingSession. Mobile clients don't do any cleanup at shutdown, so they won't experience crash at shutdown even if the app gets killed right after a session is terminated. ChromeOS enterprise IT2ME host still has a risk of session-terminate not being sent at shutdown, but this is probably fine since the host can't initiate a session termination (i.e. no disconnect window) AFAIK. Bug: 979398 Change-Id: Ie12f48257e6f9c59391a7ed15224987ffdc879ca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707592 Commit-Queue: Yuwei Huang <yuweih@chromium.org> Reviewed-by:Joe Downing <joedow@chromium.org> Cr-Commit-Position: refs/heads/master@{#678576}
Showing
Please register or sign in to comment