Beispiel #1
0
// TODO remove dead session from freecon
func (this *Client) checkServerStatus(wg *sync.WaitGroup, sess *mgo.Session) {
	defer wg.Done()
	err := sess.Ping()
	if err != nil {
		log.Error("mongodb err: %v %s", sess.LiveServers(), err)
		sess.Close()
	}
}