Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/UiPath.CoreIpc/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Connection(Stream network, ISerializer serializer, ILogger logger, string
internal async ValueTask<Response> RemoteCall(Request request, CancellationToken token)
{
var requestCompletion = Rent();
requestCompletion.MethodName = request.MethodName;
var requestId = request.Id;
_requests[requestId] = requestCompletion;
var tokenRegistration = token.UnsafeRegister(_cancelRequest, requestId);
Expand Down Expand Up @@ -211,7 +212,7 @@ private async Task ReceiveLoop()
var length = BitConverter.ToInt32(_buffer, startIndex: 1);
if (length > _maxMessageSize)
{
throw new InvalidDataException($"Message too large. The maximum message size is {_maxMessageSize / (1024 * 1024)} megabytes.");
throw new InvalidDataException($"Message too large. {Environment.NewLine} The maximum message size is {_maxMessageSize / (1024 * 1024)} megabytes. {Environment.NewLine} Active method calls: {string.Join(Environment.NewLine, _requests.Values.Select(r => r.MethodName))}");
}
_nestedStream.Reset(length);
await HandleMessage();
Expand Down
1 change: 1 addition & 0 deletions src/UiPath.CoreIpc/TaskCompletionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal static class TaskCompletionPool<T>
public sealed class ManualResetValueTaskSource : IValueTaskSource<T>, IValueTaskSource
{
private ManualResetValueTaskSourceCore<T> _core; // mutable struct; do not make this readonly
public string MethodName { get; set; }
public bool RunContinuationsAsynchronously { get => _core.RunContinuationsAsynchronously; set => _core.RunContinuationsAsynchronously = value; }
public short Version => _core.Version;
public ValueTask<T> ValueTask() => new(this, Version);
Expand Down
Loading