WinInetSuperHttpClientChannel deadlocks when setting Active to false

(obones) #1

I have some C# code here connecting to a Delphi server both using the SDK via SuperHTTP protocol
On the C# side, I was using WinInetSuperHttpClientChannel but I noticed a deadlock at the end of my application when I call the Dispose() method for it.
Doing a bit of testing showed me that simply setting Active to false leads to the same deadlock.
I replaced WinInetSuperHttpClientChannel by IpSuperHttpClientChannel and it now works just fine, so there must be an issue in the former.

The application targets .Net Core 2.1 and uses SDK version 9.4.109.1377 but I haven’t found anything in the release notes about WinInetSuperHttpClientChannel so I’m assuming this issue is still present in the latest version.

0 Likes

(antonk) #3

Hello

Could you say which exactly channel type did you use server-side?

0 Likes

(RemObjects) #4

Thanks, logged as bugs://82199

0 Likes

(obones) #5

On the server, I use TROIpSuperHTTPServer

0 Likes

(RemObjects) #6

Thanks, logged as bugs://82205

0 Likes

(antonk) #7

Hello

Unfortunately this is a platform issue/limitation:

.NET Core ignores any attempts to close an executing Http request from other thread. So WinInet* channels cannot properly perform Close operations.

The only option is to switch to IpHttp / IpSuperHttp client channels.

To avoid confusion WinInetHttpClientChannel and WinInetSuperHttpClientChannel channels will be removed from .NET Standard-targeted builds

0 Likes

(RemObjects) #8

bugs://82205 got closed with status notfixable.

0 Likes

(RemObjects) #9

bugs://82199 got closed with status fixed.

0 Likes