Legally that is a gray area. You are supposed to leave the country if you are unemployed. But USCIS usually ignores it if you file for a visa transfer in less than month from losing your job. (Alternative is that you have to leave US and get a new visa stamped and return)