MCPcopy
hub / github.com/CodisLabs/codis / keepAlive

Method keepAlive

pkg/proxy/proxy.go:430–441  ·  view source on GitHub ↗
(d time.Duration)

Source from the content-addressed store, hash-verified

428}
429
430func (s *Proxy) keepAlive(d time.Duration) {
431 var ticker = time.NewTicker(math2.MaxDuration(d, time.Second))
432 defer ticker.Stop()
433 for {
434 select {
435 case <-s.exit.C:
436 return
437 case <-ticker.C:
438 s.router.KeepAlive()
439 }
440 }
441}
442
443func (s *Proxy) acceptConn(l net.Listener) (net.Conn, error) {
444 var delay = &DelayExp2{

Callers 1

serveProxyMethod · 0.95

Calls 1

KeepAliveMethod · 0.45

Tested by

no test coverage detected