NBC and “Saturday Night Live” are grappling with how to respond to the growing outcry over the the discovery that a comedian set to join the show has a history of making racist and homophobic statements as part of his act and on a podcast that he co-hosts.

The social media-fueled controversy that erupted around Shane Gillis on Thursday night is just the latest to envelop “SNL” and various members of its troupe.

Gillis’ participation in a podcast was resurfaced Thursday by Seth Simons, a journalist who often writes about comedy. “Let the f—ing ch-nks live there,” Gillis is heard to say in one podcast episode about Chinatown. In a statement posted on Twitter Thursday night, Gillis called himself a “comedian who pushes boundaries. I sometimes miss.” He said he was “happy to apologize to anyone who’s actually offended by anything I’ve said” and that he never intended to hurt anyone, “but I am trying to be the best comedian I can be and sometimes that requires risks.”

The furor around Gillis is disrupting the typical publicity leading up to the next season of “Saturday Night Live.” Every August and September, NBC and “SNL” executive producer Lorne Michaels try to win notice for the late-night mainstay by releasing news about which cast members are leaving or returning, and, subsequently, trumpet the addition of new members to the cast. This year’s new talent batch, also unveiled Thursday, was notable for the inclusion of Bowen Yang, an Asian American, to a show that has in recent years been under scrutiny regarding racial and ethnic diversity among its on-air staff.

Representatives for NBC and “Saturday Night Live” did not immediately respond to queries Friday.

Other late-night shows have dealt with similar issues. When Trevor Noah succeeded Jon Stewart at Comedy Central’s “Daily Show” in 2015, a series of jokes he had posted on Twitter in 2011 and 2012 garnered renewed attention. Some of the remarks mocked women as well as Jewish people. Noah offered an apology via social media, saying, “To reduce my views to a handful of jokes that didn’t land is not a true reflection of my character, nor my evolution as a comedian.” The Viacom cable network defended him at the time: “Trevor Noah pushes boundaries; he is provocative and spares no one, himself included,” the network said. “To judge him or his comedy based on a handful of jokes is unfair. Trevor is a talented comedian with a bright future at Comedy Central.”

Gillis, meanwhile, has led “SNL” into uncharted territory because he has yet to appear on the program, which begins its 45th season on Sept. 28.  The silence so far from “SNL” producers and NBC suggests the sides are still trying to sort through their options and monitor whether the controversy snowballs.

In an era when actors, comedians and celebrities regularly take to social media, however, “SNL” has had its fair share of controversies to solve. Michael Che, one of the show’s head writers and a co-anchor of its regular “Weekend Update” segment, has often sparked outrage with remarks posted on Instagram and Twitter. In April of this year, for example, Che responded to an article criticizing Colin Jost, another “SNL” head writer and cast member, by disparaging the critic who wrote it.

NBC had to extinguish a bigger conflagration in 2017 after Katie Rich, a writer who often worked on the “Weekend Update” segment made fun of Barron Trump, the young son of President Donald Trump. Rich had used her personal Twitter account to post a remark suggesting the young boy would become “this country’s first homeschool shooter.” NBC suspended her for a period of time.

In one case, producers have had to determine not whether a cast member had offended others, but rather if he posed a danger to himself. In December of last year, Pete Davidson, then in the public spotlight because of a romantic relationship he had with musician Ariana Grande, posted a disturbing message on Instagram. “I’m doing my best to stay here for you but i actually don’t know how much longer i can last. all i’ve ever tried to do was help people. just remember i told you so,” he wrote in the post,  noting that he didn’t “want to be on this earth anymore.”

The remarks so alarmed his followers that the New York Police Department visited NBC and “SNL” offices at 30 Rockefeller Plaza in New York to see if the comic was safe.