diff options
Diffstat (limited to 'mojo/shell/public/cpp/lib/shell_connection.cc')
-rw-r--r-- | mojo/shell/public/cpp/lib/shell_connection.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc index d1cba7e..62ae598 100644 --- a/mojo/shell/public/cpp/lib/shell_connection.cc +++ b/mojo/shell/public/cpp/lib/shell_connection.cc @@ -86,7 +86,8 @@ void ShellConnection::OnConnectionError() { // Note that the ShellClient doesn't technically have to quit now, it may live // on to service existing connections. All existing Connectors however are // invalid. - client_->ShellConnectionLost(); + if (client_->ShellConnectionLost() && !connection_lost_closure_.is_null()) + connection_lost_closure_.Run(); // We don't reset the connector as clients may have taken a raw pointer to it. // Connect() will return nullptr if they try to connect to anything. } |