test
This commit is contained in:
parent
06e048165e
commit
828efb4c98
@ -71,7 +71,8 @@ func (p *PeerCache) checkPeerStatus(peerID string, appName string, caller *tools
|
||||
}
|
||||
url := p.urlFormat(res.(*Peer).Url, tools.PEER) + meth // Format the URL
|
||||
fmt.Println("Checking peer status on", url, "...")
|
||||
state, services := api.CheckRemotePeer(url) // Check the status of the peer
|
||||
state, services := api.CheckRemotePeer(url)
|
||||
fmt.Println("Checking peer status on", url, state, services) // Check the status of the peer
|
||||
res.(*Peer).Services = services // Update the services states of the peer
|
||||
access.UpdateOne(res, peerID) // Update the peer in the db
|
||||
return res.(*Peer), state != tools.DEAD && services[appName] == 0 // Return the peer and its status
|
||||
|
Loading…
Reference in New Issue
Block a user