catch client timeouts and cancellations

Skip to first unread message

Ali Riza KELES

Nov 14, 2019, 12:32:02 PM11/14/19
to Gorilla web toolkit

I have a question. I searched but I couldn't find an answer.

Here's my use case:  One of my handlers awaits client for a long time. This is not something unintended, this is how we want app works. And as a result of being awaited too long, sometimes client timeouts or cancellations occur. I want to catch these client timeouts or client cancellations to do some extra work.

It seems useful and worth to try, but before implementing something, I just wanted to ask community if there is a convenient way to do that.

Is it possible to catch them? Does gorilla mux provide any interfaces to do that?



Matt S

Nov 14, 2019, 12:47:29 PM11/14/19
What do you want to do - can you share a scenario?

You received this message because you are subscribed to the Google Groups "Gorilla web toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Ali Rıza KELEŞ

Nov 15, 2019, 11:33:28 AM11/15/19
Hi Matt,

On Thu, 14 Nov 2019 at 17:47, Matt S <> wrote:
> What do you want to do - can you share a scenario?

If a client (another service) cancels the request (either
intentionally or a client timeout), on server side I want to stop
current running job and next lines of handler code and push some data
to somewhere. Basically, I want to change the flow of my app according
to client cancels or timeouts.

Thank you,

Ali Riza
Reply all
Reply to author
0 new messages