MCPcopy Index your code
hub / github.com/CodisLabs/codis / CloseWithError

Method CloseWithError

pkg/proxy/session.go:94–104  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

92}
93
94func (s *Session) CloseWithError(err error) error {
95 s.exit.Do(func() {
96 if err != nil {
97 log.Infof("session [%p] closed: %s, error: %s", s, s, err)
98 } else {
99 log.Infof("session [%p] closed: %s, quit", s, s)
100 }
101 })
102 s.broken.Set(true)
103 return s.Conn.Close()
104}
105
106var (
107 ErrRouterNotOnline = errors.New("router is not online")

Callers 2

StartMethod · 0.95
loopWriterMethod · 0.95

Calls 4

InfofMethod · 0.80
CloseMethod · 0.65
DoMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected