MCPcopy
hub / github.com/aceld/zinx / check

Method check

znet/heartbeat.go:140–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138}
139
140func (h *HeartbeatChecker) check() (err error) {
141
142 if h.conn == nil {
143 return nil
144 }
145
146 if !h.conn.IsAlive() {
147 h.onRemoteNotAlive(h.conn)
148 } else {
149 if h.beatFunc != nil {
150 err = h.beatFunc(h.conn)
151 } else {
152 err = h.SendHeartBeatMsg()
153 }
154 }
155
156 return err
157}
158
159func (h *HeartbeatChecker) BindConn(conn ziface.IConnection) {
160 h.conn = conn

Callers 1

startMethod · 0.95

Calls 2

SendHeartBeatMsgMethod · 0.95
IsAliveMethod · 0.65

Tested by

no test coverage detected