|
@@ -7,6 +7,7 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Text;
|
|
|
+using Utilities;
|
|
|
|
|
|
namespace ISCSI.Server
|
|
|
{
|
|
@@ -41,6 +42,18 @@ namespace ISCSI.Server
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void ReleaseConnection(ConnectionState connection)
|
|
|
+ {
|
|
|
+
|
|
|
+ connection.RunningSCSICommands.WaitUntilZero();
|
|
|
+ connection.SendQueue.Stop();
|
|
|
+ SocketUtils.ReleaseSocket(connection.ClientSocket);
|
|
|
+ if (connection.Session != null)
|
|
|
+ {
|
|
|
+ RemoveConnection(connection);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public ConnectionState FindConnection(ConnectionState connection)
|
|
|
{
|
|
|
return FindConnection(connection.Session.ISID, connection.Session.TSIH, connection.ConnectionParameters.CID);
|