code: func (s *remoteSite) removeInvalidConns() {
  	// for first pass, do nothing if no connections are marked
  	count := 0
  	for _, conn := range s.connections {
  		if conn.isInvalid() {
  			count++
  		}
  	}
  	if count == 0 {
  		return
  	}
  	s.lastUsed = 0
  	conns := make([]*remoteConn, 0, len(s.connections)-count)
  	for i := range s.connections {
  		if !s.connections[i].isInvalid() {
  			conns = append(conns, s.connections[i])
  		} else {
  			go s.connections[i].Close()
  		}
  	}
  	s.connections = conns
  }
docs: // removeInvalidConns removes connections marked as invalid,
  // it should be called only under write lock