History

GSF.ServiceProcess: Removed a race condition caused by async connection retry on shutdown of ClientHelper.

ritchiecarroll committed 11 years ago

Commit 329637e1 parent 62ca4081 file · +10 −1Browse files

Showing the changes to Source/Libraries/GSF.ServiceProcess/ClientHelper.cs (1 of 1 file). Show all

Unified · Split

Source/Libraries/GSF.ServiceProcess/ClientHelper.cs+10−1
@@ -644,7 +644,16 @@ namespace GSF.ServiceProcess · 643 unmodified lines
644 // This will be done only when the object is disposed by calling Dispose().644 // This will be done only when the object is disposed by calling Dispose().
645 Disconnect();645 Disconnect();
646 SaveSettings();646 SaveSettings();
647 RemotingClient = null;647
648 if ((object)m_remotingClient != null)
649 {
650 // Detach events from any existing instance
651 m_remotingClient.ConnectionEstablished -= RemotingClient_ConnectionEstablished;
652 m_remotingClient.ConnectionAttempt -= RemotingClient_ConnectionAttempt;
653 m_remotingClient.ConnectionException -= RemotingClient_ConnectionException;
654 m_remotingClient.ConnectionTerminated -= RemotingClient_ConnectionTerminated;
655 m_remotingClient.ReceiveDataComplete -= RemotingClient_ReceiveDataComplete;
656 }
648 }657 }
649 }658 }
650 finally659 finally

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t