Index: Network/DicomClient.cs
===================================================================
--- Network/DicomClient.cs (revision 10084)
+++ Network/DicomClient.cs (working copy)
@@ -213,6 +213,18 @@
}
}
+ public void Abort()
+ {
+ try
+ {
+ SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
+ }
+ finally
+ {
+ CloseNetwork();
+ }
+ }
+
private void ConnectTLS()
{
_closedOnError = false;
@@ -510,7 +522,7 @@
if (disposing)
{
// Dispose of other Managed objects, ie
- CloseNetwork();
+ Abort();
}
// FREE UNMANAGED RESOURCES
_disposed = true;
Index: Network/NetworkBase.cs
===================================================================
--- Network/NetworkBase.cs (revision 10084)
+++ Network/NetworkBase.cs (working copy)
@@ -237,7 +237,7 @@
{
if (!Thread.CurrentThread.Equals(_thread))
{
- _thread.Join();
+ _thread.Join(2500);
_thread = null;
}
}
Index: Network/Scu/ScuBase.cs
===================================================================
--- Network/Scu/ScuBase.cs (revision 10084)
+++ Network/Scu/ScuBase.cs (working copy)
@@ -281,7 +281,14 @@
}
return iodList;
}
-
+
+ public void Abort()
+ {
+ if (_dicomClient != null)
+ {
+ _dicomClient.Abort();
+ }
+ }
#endregion
#region Protected Methods...
@@ -663,48 +670,51 @@
}
#endregion
- }
+ }
- ///
- ///
- ///
- public enum ScuOperationStatus
- {
- ///
- ///
- ///
- NotRunning = 0,
- ///
- ///
- ///
- Running = 1,
- ///
- /// Dimse timeout expired.
- ///
- TimeoutExpired = 2,
- ///
- /// The scu operation was cancelled.
- ///
- Canceled = 3,
- ///
- /// A failure occured
- ///
- Failed = 4,
- ///
- /// A connection failure occured
- ///
- ConnectFailed = 5,
- ///
- /// The association was rejected.
- ///
- AssociationRejected = 6,
- ///
- /// An unexpected network error occurred.
- ///
- NetworkError = 7,
- ///
- /// An unexpected message was received and the association was aborted.
- ///
- UnexpectedMessage = 8
- }
+ #region ScuOperationStatus Enum
+ ///
+ ///
+ ///
+ public enum ScuOperationStatus
+ {
+ ///
+ ///
+ ///
+ NotRunning = 0,
+ ///
+ ///
+ ///
+ Running = 1,
+ ///
+ /// Dimse timeout expired.
+ ///
+ TimeoutExpired = 2,
+ ///
+ /// The scu operation was cancelled.
+ ///
+ Canceled = 3,
+ ///
+ /// A failure occured
+ ///
+ Failed = 4,
+ ///
+ /// A connection failure occured
+ ///
+ ConnectFailed = 5,
+ ///
+ /// The association was rejected.
+ ///
+ AssociationRejected = 6,
+ ///
+ /// An unexpected network error occurred.
+ ///
+ NetworkError = 7,
+ ///
+ /// An unexpected message was received and the association was aborted.
+ ///
+ UnexpectedMessage = 8
+ }
+
+ #endregion
}