History

GSF.Security: Updated AdoSecurityProvider to fall back on Select when PrimaryKey can not defined, for whatever reason. GSF.TimeSeries: Updated operation of ServiceClientBase to not reconnect too quickly.

ritchiecarroll committed 11 years ago

Commit e507bb91 parent 6ff9d406 files · +129 −35Browse files

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

Unified · Split

Source/Libraries/GSF.ServiceProcess/ClientHelper.cs+5−15
@@ -487,10 +487,6 @@ namespace GSF.ServiceProcess · 486 unmodified lines
487487 if ((object)m_remotingClient == null)
488488 throw new InvalidOperationException("RemotingClient property of ClientHelper component is not set");
489489
490− // Nothing to do if remoting client is already connected
491− if (m_remotingClient.Enabled)
492− return;
493−
494490 m_authenticationComplete = false;
495491
496492 // Wait for connection.
@@ -500,6 +496,10 @@ namespace GSF.ServiceProcess · 3 unmodified lines
500496 {
501497 // Wait for authentication.
502498 Thread.Sleep(100);
499+
500+ // If remoting client has been disposed (and set to null) while sleeping, go ahead and exit...
501+ if ((object)m_remotingClient == null)
502+ return;
503503 }
504504
505505 if (m_remotingClient.Enabled)
@@ -718,17 +718,7 @@ namespace GSF.ServiceProcess · 212 unmodified lines
718718
719719 // Attempt reconnection on a separate thread.
720720 if (m_attemptReconnection)
721− {
722− new Thread(state =>
723− {
724− // Wait at least one second between reconnect attempts...
725− if (Common.IsPosixEnvironment)
726− Thread.Sleep(1000);
727−
728− Connect();
729−
730− }).Start();
731− }
721+ new Thread(Connect).Start();
732722 }
733723
734724 private void RemotingClient_ReceiveDataComplete(object sender, EventArgs<byte[], int> e)

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