OPCFoundation / UA-.NET-Legacy

OPC Foundation Unified Architecture .NET Reference Implementations
332 stars 297 forks source link

SessionDiagnosticsArray is not correctly updated on client disconnection #134

Open Alex6092 opened 7 years ago

Alex6092 commented 7 years ago

The SessionDiagnosticsArray is not correctly updated on client disconnection, we propose the following modifications in file SampleApplications/SampleLibraries/Server/Diagnostics/DiagnosticsNodeManager.cs, around line 700, function DeleteSessionDiagnostics :

               // release the server lock if it is being held.
                if (m_serverLockHolder == nodeId)
                {
                    m_serverLockHolder = null;
                }
                // Call DoScan :
                DoScan(true);

and around line 1223, function DoScan :

                            // Set the correct variable to true :
                            //sessionsChanged = true;
                            sessionsSecurityChanged = true;