func (s *Server) Ping() error {
	if err := s.db.Ping(); err != nil {
		if cerr := s.Close(); cerr != nil {
			log.Errorf("Error while closing non-pinging DB connection to %q: %v", s, cerr)
		}
		return err
	}
	return nil
}
// Ping checks connection availability and possibly invalidates the connection if it fails.
Ping checks connection availability and possibly invalidates the connection if it fails.
// Ping checks connection availability and possibly invalidates the connection if it fails .
func (s *Server) Ping() error {
	if err := s.db.Ping(); err != nil {
		if cerr := s.Close(); cerr != nil {
			log.Errorf("Error while closing non-pinging DB connection to %q: %v", s, cerr)
		}
		return err
	}
	return nil
}
func ( s * Server ) Ping ( ) error { if err := s . db . Ping ( ) ; err != nil { if cerr := s . Close ( ) ; cerr != nil { log . Errorf ( " " , s , cerr ) } return err } return nil }
Ping checks connection availability and possibly invalidates the connection if it fails.
Ping checks connection availability and possibly invalidates the connection if it fails .