H1 transfer question

I'm currently working under H1 through an agency and on a contract job. If that agency can't find me another job when my current contract ends they will cancel my visa as of that day (in about 2.5 weeks).
I have some opportunities lined up but even if another company hires me I will need to transfer my visa which will also take some time.
Does anyone know if there could be any gap between when my current contract ends and when I get approved for my visa transfer to a new company?
If the new company file visa transfer before the last day of my current assignment, will I still be legal to stay here until I'm allowed to work?

Thank you very much.

請您先登陸,再發跟帖!