Skip to content

Unhandled exception from NetworkRequestAsync #281

@rderuiter-slashwhy

Description

@rderuiter-slashwhy

I'm using ZeroConf 3.7.16 in my project and noticed an Unhandled Exception:

07-14 16:15:08.550 E/        (18938): [Error] Unhandled exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Operation Canceled)
07-14 16:15:08.550 E/        (18938):  ---> System.Net.Sockets.SocketException (125): Operation Canceled
07-14 16:15:08.550 E/        (18938):    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
07-14 16:15:08.550 E/        (18938):    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Net.Sockets.SocketReceiveFromResult>.GetResult(Int16 token)
07-14 16:15:08.550 E/        (18938):    at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c[[System.Net.Sockets.SocketReceiveFromResult, System.Net.Sockets, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].<.cctor>b__4_0(Object state)
07-14 16:15:08.550 E/        (18938): --- End of stack trace from previous location ---
07-14 16:15:08.550 E/        (18938):    at System.Net.Sockets.UdpClient.<ReceiveAsync>g__WaitAndWrap|61_0(Task`1 task)
07-14 16:15:08.550 E/        (18938):    at Zeroconf.NetworkInterface.<>c__DisplayClass1_1.<<NetworkRequestAsync>b__1>d.MoveNext() in /_/Zeroconf/NetworkInterface.cs:line 133
07-14 16:15:08.550 E/        (18938):    --- End of inner exception stack trace ---

This was seen on Android, the project itself is a .NET9 MAUI app.

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