Skip to content

Commit

Permalink
Ensure the tooltip is not incorrectly updated when the incoming endpo…
Browse files Browse the repository at this point in the history
…int is updated.
  • Loading branch information
fgimian committed Feb 2, 2025
1 parent 78fd775 commit 1a55be9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/TotalMixVC/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ public void ReloadConfig()

if (_listener?.EP.ToString() != _config.Osc.IncomingEndPoint.ToString())
{
_volumeManager.Listener = null;
_listener?.Dispose();
_trayToolTipStatus.Text = "TotalMix Volume Manager is initializing.";

Expand Down Expand Up @@ -491,7 +490,7 @@ await _joinableTaskFactory.SwitchToMainThreadAsync(
);
_trayIcon.ToolTipText = "TotalMixVC - Unable to connect to your device";
}
catch (SocketException)
catch (Exception ex) when (ex is SocketException or ObjectDisposedException)
{
// This exception is raised during a reconnect which can be ignored.
}
Expand Down
3 changes: 3 additions & 0 deletions src/TotalMixVC/Communicator/VolumeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public async Task RequestVolumeAsync()
/// The task was cancelled using the provided cancellation token source.
/// </exception>
/// <exception cref="InvalidOperationException">The listener is null.</exception>
/// <exception cref="ObjectDisposedException">
/// The underlying <see cref="Socket"/> has been closed.
/// </exception>
/// <exception cref="SocketException">An error occurred when accessing the socket.</exception>
/// <exception cref="TimeoutException">The task timed out.</exception>
public async Task<bool> ReceiveVolumeAsync(
Expand Down

0 comments on commit 1a55be9

Please sign in to comment.