How early do someone needs to leave for the match to be cancelled?

I don’t know if this is a bug or so but recently I am seeing this quite often.
With the incredible increase of leavers since the end of OW1 and still going on we are seeing more and more people leaving the games.
However the match cancelling seems to have a mind of its own. Sometimes matches get cancelled minutes into match when someone leaves or sometimes even if someone leaves in the first seconds match doesn’t get cancelled.
What is the rule of this match cancelling?

I think its a bug,i got afew game cancel during mins of gameplay like you said.Sometimes,i got into a middle of a game which i think,i’m replacing someone or i knock him out & replace him.And you know whut? I get disconnected as i was about afew steps away from pushing the payload to finish.Its just sick :’(

If any team drops to 2 members during a match .the match gets cancelled irrespective of time