ipfs-shipyard / net-ipfs-http-client

InterPlanetary File System client for .Net (C#, VB, F# ...)
MIT License
35 stars 13 forks source link

FileSystemNode.DataStream should be marked Obsolete #30

Closed Arlodotexe closed 3 months ago

Arlodotexe commented 7 months ago

Calling .Result on an asynchronous method, especially for a property getter where it isn't obvious this is happening, risks deadlocking the thread that called it.

https://github.com/ipfs-shipyard/net-ipfs-http-client/blob/2a0cd840575d6c53aa50b3f6df9d6ddf54c6b2fb/src/FileSystemNode.cs#L40

This property needs to marked as Obsolete and removed in a future update. Consumers should call IpfsClient?.FileSystem.ReadFileAsync(Id) directly.

Originally reported in the #ipfs-shipyard channel in the UWP Community Discord server.

Arlodotexe commented 3 months ago

Closed in https://github.com/ipfs-shipyard/net-ipfs-http-client/pull/34