Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

RequestAborted cancellation tokens not triggered for Kestrel #30

Closed
Praburaj opened this issue Sep 19, 2014 · 6 comments
Closed

RequestAborted cancellation tokens not triggered for Kestrel #30

Praburaj opened this issue Sep 19, 2014 · 6 comments
Assignees
Milestone

Comments

@Praburaj
Copy link
Contributor

Example:

public class Startup
{
        static int count = 0;
        public void Configure(IApplicationBuilder app)
        {
            app.Run(async context =>
            {
                int requestId = count++;
                Console.WriteLine("Received request {0}", requestId);
                context.RequestAborted.Register(() =>
                {
                    Console.WriteLine("Cancellation token fired for request Id : {0}", requestId);
                });

                await context.Response.WriteAsync("Hello world" + requestId.ToString());
                await System.Threading.Tasks.Task.Delay(10 * 1000);
                await context.Response.WriteAsync("Finished writing" + requestId.ToString());
            });
        }
}

Host this application using Kestrel and make a request from IE or Chrome. Hit escape to notice that cancellation tokens are not triggered.

@muratg
Copy link
Contributor

muratg commented Jul 16, 2015

@halter73

@muratg muratg added this to the 1.0.0 Backlog milestone Jul 16, 2015
@halter73
Copy link
Member

@muratg Do we want this for beta7?

@muratg
Copy link
Contributor

muratg commented Jul 16, 2015

@halter73 can you check with @lodejard?

@muratg
Copy link
Contributor

muratg commented Sep 24, 2015

@halter73 @lodejard @DamianEdwards needed in RC1?

@DamianEdwards
Copy link
Member

@muratg no, can be punted to post-RC

@Tratcher Tratcher removed this from the 1.0.0 backlog milestone Nov 23, 2015
@halter73 halter73 added this to the 1.0.0-rc2 milestone Nov 23, 2015
@halter73
Copy link
Member

Fixed by #325

Likely to be improved by #408

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants