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

Need help with SSE and .NET events #55663

Open
salarzobir opened this issue May 10, 2024 · 0 comments
Open

Need help with SSE and .NET events #55663

salarzobir opened this issue May 10, 2024 · 0 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@salarzobir
Copy link

Hey people, I am not even sure whether this is the correct place to ask for help, please forgive me if it is not.

I created this sample ASP.NET Core project https://github.com/salarzobir/SseTest to demonstrate my problem, I am not even sure whether the behavior (message overlapping or process crashing) is a normal intended behavior.

What could be the best way to fix this problem.

In my actual production application I am getting this exception sometimes then the process crashes:

System.ArgumentNullException: Value cannot be null. (Parameter 'array')
   at System.Buffers.SharedArrayPool`1.Return(T[] array, Boolean clearArray)
   at System.IO.Pipelines.StreamPipeWriter.FlushAsyncInternal(Boolean writeToStream, ReadOnlyMemory`1 data, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Threading.Tasks.ValueTask`1.GetTaskForValueTaskSource(IValueTaskSource`1 t)
--- End of stack trace from previous location ---
   at MyProject.Services.SseClient.SendAsync[T](T data, String eventType)
   at MyProject.Services.SseService.SendEventAsync[T](IEnumerable`1 clientIds, T data, String eventType)
   at MyProject.Services.SomeService.OnProgressChanged(Object sender, PropertyChangedEventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label May 10, 2024
@javiercn javiercn added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-blazor Includes: Blazor, Razor Components labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

2 participants