Re: [go-nuts] Purpose of TimeoutHandler

2021-04-24 Thread Brian Candler
That works too. Err() is guaranteed to return non-nil, either if the context was explicitly cancelled or its deadline was exceeded. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it

Re: [go-nuts] Purpose of TimeoutHandler

2021-04-24 Thread Amit Saha
> On 19 Apr 2021, at 10:07 pm, Amit Saha wrote: > > Thank you, I was suspecting that this might be the way to do it. This is another approach I thought would also work without using channels or where you are just running a sequence of steps in a handler: func handleUserAPI(w http.ResponseWri

[go-nuts] Purpose of TimeoutHandler

2021-04-18 Thread Amit Saha
Hi all - I wrongly assumed that the TimeoutHandler() is supposed to help application authors free up resources on the sever for anything running than the expected duration of time. However that doesn’t seem to be the case. The inner handler continues running, only the client gets a 503 after the