I'm working on a http server using Go.
However I have this weird issue that I don't understand.
When I cancel an ongoing HTTP request on the client (I use Insomnia) side, the server will exit with logs like this:
2017/05/15 11:25:24 context canceled
Process finished with exit code 1
Can someone help me explain why the server exits itself ?
I use pressly/chi to implement my http handlers.
I figured it out.
Apparently, in one place, I call log.Fatalf() when there's an error, causing the app to exit when the context canceled.
Furthermore, my lack of understanding of how context cancelling works makes it difficult to make debug the problem.