MCPcopy
hub / github.com/tinode/chat / handleRpcResponse

Method handleRpcResponse

server/cluster.go:331–343  ·  view source on GitHub ↗
(call *rpc.Call)

Source from the content-addressed store, hash-verified

329}
330
331func (n *ClusterNode) handleRpcResponse(call *rpc.Call) {
332 if call.Error != nil {
333 logs.Warn.Printf("cluster: %s call failed: %s", call.ServiceMethod, call.Error)
334 n.lock.Lock()
335 if n.connected {
336 n.endpoint.Close()
337 n.connected = false
338 statsInc("LiveClusterNodes", -1)
339 go n.reconnect()
340 }
341 n.lock.Unlock()
342 }
343}
344
345func (n *ClusterNode) callAsync(proc string, req, resp any, done chan *rpc.Call) *rpc.Call {
346 if done != nil && cap(done) == 0 {

Callers 2

asyncRpcLoopMethod · 0.95
callAsyncMethod · 0.95

Calls 5

reconnectMethod · 0.95
statsIncFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected