Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close socket if a client stops processing responses. #2110

Merged
merged 16 commits into from
Apr 10, 2023
Prev Previous commit
Next Next commit
TODO
  • Loading branch information
mregen committed Mar 31, 2023
commit 57c5241c680da5a24f1c4a6d4ba48bec86ad9332
15 changes: 2 additions & 13 deletions Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,7 @@ protected void BeginWriteMessage(ArraySegment<byte> buffer, object state)

try
{
var requests = Interlocked.Increment(ref m_activeWriteRequests);
// TODO remove
if (requests % 100 == 0)
{
Utils.LogInfo("Send Requests: {0}", requests);
}
Interlocked.Increment(ref m_activeWriteRequests);
args.SetBuffer(buffer.Array, buffer.Offset, buffer.Count);
args.Completed += OnWriteComplete;
args.UserToken = state;
Expand Down Expand Up @@ -479,13 +474,7 @@ protected void BeginWriteMessage(BufferCollection buffers, object state)

try
{
var requests = Interlocked.Increment(ref m_activeWriteRequests);
// TODO remove
if (requests % 100 == 0)
{
Utils.LogInfo("Send Requests: {0}", requests);
}

Interlocked.Increment(ref m_activeWriteRequests);
args.BufferList = buffers;
args.Completed += OnWriteComplete;
args.UserToken = state;
Expand Down