Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(A better) Refactoring of how connection restarting is handled #15240

Merged
merged 15 commits into from
Apr 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/cascadia/TerminalControl/ControlCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,20 @@ namespace winrt::Microsoft::Terminal::Control::implementation
if (_connection)
{
_connectionOutputEventRevoker.revoke();

// Fire off a connection state changed notification, to let our hosting
// app know that we're in a different state now.
if (newConnection.State() != _connection.State())
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
{
_ConnectionStateChangedHandlers(*this, nullptr);
DHowett marked this conversation as resolved.
Show resolved Hide resolved
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
}
}

// Subscribe to the connection's disconnected event and call our connection closed handlers.
_connectionStateChangedRevoker = newConnection.StateChanged(winrt::auto_revoke, [this](auto&& /*s*/, auto&& /*v*/) {
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
_ConnectionStateChangedHandlers(*this, nullptr);
});

// Fire off a connection state changed notification, to let our hosting
// app know that we're in a different state now.
if (newConnection.State() != _connection.State())
{
_ConnectionStateChangedHandlers(*this, nullptr);
}

// Get our current size in rows/cols, and hook them up to
// this connection too.
{
Expand Down