It is valid behavior that an http(tcp) request can get lost without the listeners get informed. see here for the discussion on that: C# httpClient (block for async call) deadlock
Problem We are using HttpClient.PostAsJsonAsync to upload a Json File to a server. However in worst case scenarios this upload can take several hours. That's why just using HttpClient.Timeout is not working for us. This is an hard timeout and we need to have it huge.
So what do we do when the tcp connection is gone and the client does not detect that. With our huge timeout we are stuck for a long time. So is there any other Timeout we can use in such cases? Any other ideas or best practices? I was also looking into tcp sockets keep alive, but that doesn't seem to be an option.