-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Can't disable KeepAlive for ClientWebSocket #15992
Comments
cc: @CIPop |
Ok, then i'll have to wait. Thx. |
This is actually by design and mirrors the behavior from .Net Desktop (see http://referencesource.microsoft.com/#System/net/System/Net/WebSockets/ClientWebSocket.cs,592). I'm not sure if this can be controlled on Windows since the implementation is based on WinHTTP. Please open or convert this item to a feature request by changing the title. Adding behavior-pinning unit/functional tests is still tracked by dotnet/corefx#5120 as @SidharthNabar mentioned. |
@CIPop For WinHTTP, there is a flag WINHTTP_DISABLE_KEEP_ALIVE which can be used with WinHttpQueryOption or WinHttpSetOption. https://msdn.microsoft.com/en-us/library/windows/desktop/aa384066.aspx |
Thanks @wulf2468 I have reactivated this issue and changed the type. |
Let's actually track this in one place: dotnet/corefx#5120. |
I ported a project from .net 4.5 to Core. Building worked fine, but execution with .net Core doesn't work. First of all setting KeepAliveInterval to -1 is no longer supported and throws an OutOfRangeException.
Setting it to any other value (e.g. 0) keeps KeepAlive on.
I looked at the ClientWebSocket-Code. I suspect KeepAliveInterval is never used. So currently there is no way to modify KeepAlive behavior.
The text was updated successfully, but these errors were encountered: