Ryan admitted that the musical comedy-drama would have come to an end if Cory's girlfriend and co-star Lea Michele, felt she could not continue with it.
Speaking to E! News, Ryan said: "How did you decide what to do with the show? Once you're faced with this situation, which is devastating… There's really no way to win in this situation.
"So our position was, do we go off the air permanently? Do we go off the air until November? Do we start shooting again in January?"
Ryan said Lea made big decisions in regards to the show's future, and "felt that the best thing for the cast and crew was to be together" and share "memories of him."
Cory passed away aged 31 on 13 July in Vancouver, Canada after he was found alone in his hotel room after missing his check-out time. A coroner confirmed that Cory died from a heroin and alcohol overdose following a night out with friends.
Cory, who played the loveable Finn Hudson on the show, worked closely with charities off-screen and was devoted to helping people lead positive lives.
When Ryan was asked if he thought about ending the show for good, he said: "Yes. And I've never met any 26-year-old person stronger than Lea.
"It's just rough and it sucks and there's no right way to do it. Ultimately, everyone involved made the decision, 'OK, what does Lea want to do, what would Lea feel comfortable doing?' This is what she wants to do."
Glee will premiere it's fifth season on 26 September in the US, a week later than originally planned, and will kick off with three episodes.
It will start with a two-part Beatles tribute and the third episode will be a special tribute show to Cory - and then "we're going to go off the air for a while and take a little hiatus and figure out what is the future of the show," Ryan explained.
Ryan, who described Cory as "a real leader", added: "I think Cory was very much like Finn [in] that Cory really was a champion of young artists and the underdog."