R
R
recloudor2016-07-28 13:52:39
go
recloudor, 2016-07-28 13:52:39

go. Why does the request not give control to the Handle?

A request comes in, but the handle to the function is not passed to process it.
It doesn't even mark as not found the request url.
https://habrahabr.ru/post/202584/ Installed Graceful restart, I
use gin as a shell. This is how I create a custom server:

router := gin.New()
  router.Use(gin.Recovery())

  s := &http.Server{
    Addr:           ":9999",
    Handler:        router,
    ReadTimeout:    45 * time.Second,
    WriteTimeout:   45 * time.Second,
    MaxHeaderBytes: 1 << 20,
  }
        . . .
  err = s.Serve(listener1)

Example:
If I often send requests to certain URLs, then soon they stop working and just redirect me to /.
I assume that the matter is in the graceful server, and due to some hidden error, the requests go somewhere in the wrong place.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Grabko, 2016-07-29
@VGrabko

This is not the first time something has been written about this problem in gin on a toaster. I suppose that 3 different people cannot make the same incomprehensible mistake in a short period of time. I think the problem is in gin itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question