Skip to content

wrong judgement "msg.ContentLength >= _Settings.MaxProxiedStreamSize" #286

Description

@zuolinLee

bug:
class :WatsonTcpServer, line:1167
if (msg.ContentLength >= _Settings.MaxProxiedStreamSize)
{
ws = new WatsonStream(msg.ContentLength, msg.DataStream);
sr = new StreamReceivedEventArgs(client, msg.Metadata, msg.ContentLength, ws);
_Events.HandleStreamReceived(this, sr);
}
else
{
MemoryStream ms = await WatsonCommon.DataStreamToMemoryStream(msg.ContentLength, msg.DataStream, _Settings.StreamBufferSize, token).ConfigureAwait(false);
ws = new WatsonStream(msg.ContentLength, ms);
sr = new StreamReceivedEventArgs(client, msg.Metadata, msg.ContentLength, ws);
await Task.Run(() => _Events.HandleStreamReceived(this, sr), token);
}
i think this is should be " if (msg.ContentLength <= _Settings.MaxProxiedStreamSize)",not >=

and I am trying to use watsonTcp for large file transmission, but the performance is not satisfactory,I'm trying to figure out why

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions