Code-Sharp / WampSharp

A C# implementation of WAMP (The Web Application Messaging Protocol)
http://wampsharp.net
Other
385 stars 84 forks source link

Progress reporting broken for async operations without a return value #357

Closed trombipeti closed 1 year ago

trombipeti commented 1 year ago

My fix for #353 was not perfect: I get no progress value with "resultless" async methods (public async Task SomeMethod(/* params */ IProgress<int> progress, CancellationToken cancellationToken)

The problem lies here I think: https://github.com/Code-Sharp/WampSharp/blob/8fef06c12581872e810bd86a59af4505dbcf00cc/src/netstandard/WampSharp/WAMP2/V2/Rpc/Callee/Reflection/AsyncMethodInfoRpcOperation.cs#L32 and https://github.com/Code-Sharp/WampSharp/blob/8fef06c12581872e810bd86a59af4505dbcf00cc/src/netstandard/WampSharp/WAMP2/V2/Rpc/Callee/LocalRpcOperation.cs#L80

We have a workaround for this issue in our project and I can only start working on this in August, but if you'd have time until then to fix it, I'd be very happy :)

darkl commented 1 year ago

I think I fixed it in 23.5.1-develop-49. Could you try it out and let me know if it works for you?

Thanks Elad

trombipeti commented 1 year ago

Hi @darkl, yep, it seems to have fixed it - now we don't have to return a dummy boolean and still get progress reporting :)

(btw, maybe I missed something, but when I tried to do dotnet add package WampSharp --version 23.5.1-develop-49 and did a build, I got the following: "...depends on WampSharp (>= 23.5.1-develop-49) but WampSharp 23.5.1-develop-49 was not found. An approximate best match of WampSharp 23.5.1 was resolved." So I built it manually from the latest master and tried that.)

Long story short, works, thx!