If flight is canceled or overbooked, call the airline’s 800 number instead of getting into a terrifyingly long line. The customer service representative on the phone can do anything the gate agent can. Or, even better, call while waiting in line, and work with whichever becomes available first.
This way the airline you booked through will get you to that final destination without the extra costs that will occur with missed connections through delayed or canceled flights.