Skip to content

KeepAliveInterval doesn't seem to work #2464

@aspnet-hello

Description

@aspnet-hello

From @nehmebilal on Thursday, October 5, 2017 9:54:50 AM

In my StartUp class of ASP.Net app hosted using WebListener, I am adding the WebSocketMiddleware as follows:

            var webSocketOptions = new WebSocketOptions
            {
                KeepAliveInterval = TimeSpan.FromSeconds(30),
            };
            app.UseWebSockets(webSocketOptions);

Then I am creating WebSockets as follows:

        public async Task Configure(HttpContext hc, Func<Task> next)
        {
           var webSocket = hc.WebSockets.AcceptWebSocketAsync();
           /// ...
        }

The value I use for KeepAliveInterval doesn't seem to have any effect and it still seems to take up to 2 minutes to send a ping.

I am currently using Microsoft.AspNetCore.WebSockets 1.0.2.

Am I doing anything wrong?

Copied from original issue: aspnet/WebSockets#204

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-websocketsIncludes: WebSockets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions